Skip to content

Commit e3c7a18

Browse files
committedFeb 20, 2019
Add blank library.properties url field check to check_library_manager_compliance
1 parent 2137055 commit e3c7a18

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎arduino-ci-script.sh

+8
Original file line numberDiff line numberDiff line change
@@ -2269,6 +2269,7 @@ readonly ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_NAME_HAS_INVALID_FIR
22692269
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))
22702270
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))
22712271
ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER=$((ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_NAME_TOO_LONG_EXIT_STATUS + 1))
2272+
readonly ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_BLANK_URL_EXIT_STATUS=$ARDUINO_CI_SCRIPT_EXIT_STATUS_COUNTER
22722273
function check_library_manager_compliance() {
22732274
local -r libraryPath="$1"
22742275
# Replace backslashes with slashes
@@ -2320,6 +2321,13 @@ function check_library_manager_compliance() {
23202321
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"
23212322
exitStatus=$(set_exit_status "$exitStatus" $((ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_CHECK_FOLDER_NAME_OFFSET + checkFolderNameExitStatus)))
23222323
fi
2324+
2325+
local urlValue
2326+
urlValue="$(get_library_properties_field_value "$libraryProperties" 'url')"
2327+
if [[ "$urlValue" == "" ]]; then
2328+
echo "ERROR: ${normalizedLibraryPath}/library.properties: Blank url value: You must define a URL."
2329+
exitStatus=$(set_exit_status "$exitStatus" $ARDUINO_CI_SCRIPT_CHECK_LIBRARY_MANAGER_COMPLIANCE_BLANK_URL_EXIT_STATUS)
2330+
fi
23232331
fi
23242332

23252333
return "$exitStatus"

4 commit comments

Comments
 (4)

arduino-ci-script-bot commented on Feb 20, 2019

@arduino-ci-script-bot

arduino-ci-script-bot commented on Feb 20, 2019

@arduino-ci-script-bot

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 commented on Feb 21, 2019

@arduino-ci-script-bot

arduino-ci-script-bot commented on Feb 21, 2019

@arduino-ci-script-bot

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.