Skip to content

Commit

Permalink
Add blank library.properties url field check to check_library_manager…
Browse files Browse the repository at this point in the history
…_compliance
  • Loading branch information
per1234 committed Feb 20, 2019
1 parent 2137055 commit e3c7a18
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arduino-ci-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2269,6 +2269,7 @@ readonly ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_NAME_HAS_INVALID_FIR
readonly ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_NAME_HAS_INVALID_CHARACTER_EXIT_STATUS=$((ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_CHECK_FOLDER_NAME_OFFSET + ARDUINO_CI_SCRIPT_CHECK_FOLDER_NAME_INVALID_CHARACTER_EXIT_STATUS))
readonly ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_NAME_TOO_LONG_EXIT_STATUS=$((ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_CHECK_FOLDER_NAME_OFFSET + ARDUINO_CI_SCRIPT_CHECK_FOLDER_NAME_TOO_LONG_EXIT_STATUS))
ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER=$((ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_NAME_TOO_LONG_EXIT_STATUS + 1))
readonly ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_BLANK_URL_EXIT_STATUS=$ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER
function check_library_manager_compliance() {
local -r libraryPath="$1"
# Replace backslashes with slashes
Expand Down Expand Up @@ -2320,6 +2321,13 @@ function check_library_manager_compliance() {
echo "ERROR: ${normalizedLibraryPath}/library.properties: name value: $nameValue does not meet the requirements of the Arduino Library Manager indexer. See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format"
exitStatus=$(set_exit_status "$exitStatus" $((ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_CHECK_FOLDER_NAME_OFFSET + checkFolderNameExitStatus)))
fi

local urlValue
urlValue="$(get_library_properties_field_value "$libraryProperties" 'url')"
if [[ "$urlValue" == "" ]]; then
echo "ERROR: ${normalizedLibraryPath}/library.properties: Blank url value: You must define a URL."
exitStatus=$(set_exit_status "$exitStatus" $ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_BLANK_URL_EXIT_STATUS)
fi
fi

return "$exitStatus"
Expand Down

4 comments on commit e3c7a18

@arduino-ci-script-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arduino-ci-script-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once completed, the job reports for Travis CI build 854 will be found at:
https://github.com/per1234/CI-reports/tree/arduino-ci-script/build_00854

@arduino-ci-script-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arduino-ci-script-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once completed, the job reports for Travis CI build 856 will be found at:
https://github.com/per1234/CI-reports/tree/arduino-ci-script/build_00856

Please sign in to comment.