diff --git a/.travis.yml b/.travis.yml index 56b3dc8..7dbd060 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ services: - docker script: - - ./test.sh + - make test diff --git a/github-dev/upload-assets b/github-dev/upload-assets index b16349e..404e4ac 100755 --- a/github-dev/upload-assets +++ b/github-dev/upload-assets @@ -37,8 +37,8 @@ main(){ # Get the tags. tag_response=$(curl -sSL -H "${AUTH_HEADER}" -H "${API_HEADER}" "${URI}/repos/${GITHUB_REPOSITORY}/tags") - tag_name=$(echo $tag_response | jq -e --raw-output .[0].name) - tag_id=$(echo $tag_response | jq -e --raw-output .[0].id) + tag_name=$(echo "$tag_response" | jq -e --raw-output .[0].name) + tag_id=$(echo "$tag_response" | jq -e --raw-output .[0].id) # Get the latest release. latest_response=$(curl -sSL -H "${AUTH_HEADER}" -H "${API_HEADER}" "${URI}/repos/${GITHUB_REPOSITORY}/releases/latest") @@ -48,18 +48,18 @@ main(){ if [[ "$tag_name" != "$latest_release" ]]; then # Create the release. echo "Creating release for tag name: ${tag_name}" - response=$(curl -XPOST -sSL -H "${AUTH_HEADER}" -H "${API_HEADER}" "${URI}/repos/${GITHUB_REPOSITORY}/release" --data '{"tag_name": "'${tag_name}'","name":"'${tag_name}'","draft":false,"prerelease":false}') - release_id=$(echo $response | jq -e --raw-output .id) + response=$(curl -XPOST -sSL -H "${AUTH_HEADER}" -H "${API_HEADER}" "${URI}/repos/${GITHUB_REPOSITORY}/release" --data '{"tag_name": "'"${tag_name}"'","name":"'"${tag_name}"'","draft":false,"prerelease":false}') + release_id=$(echo "$response" | jq -e --raw-output .id) fi # Upload the files. - echo "Uploading files: ${files[@]}" + echo "Uploading files: ${files[*]}" echo "For tag name: ${tag_name} tag id: ${tag_id}" - for file in ${files[@]}; do + for file in "${files[@]}"; do filename=$(basename "$file") - curl -XPOST -sSL -H "${AUTH_HEADER}" -H "${API_HEADER}" \ + curl -XPOST -sSL -H "${AUTH_HEADER}" \ --data-binary @"$file" \ -H "Content-Type: application/octet-stream" \ "https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${release_id}/assets?name=${filename}" @@ -70,4 +70,4 @@ main(){ echo "Uploading assets to ${tag_name} complete!" } -main $@ +main "$@" diff --git a/gitiles/start.sh b/gitiles/start.sh index 361c68d..585877a 100755 --- a/gitiles/start.sh +++ b/gitiles/start.sh @@ -27,4 +27,5 @@ fi PROPERTIES="$PROPERTIES --jvm_flag=-Dcom.google.gitiles.sourcePath=$ROOT" +# shellcheck disable=SC2086 exec "${ROOT}/bin/gitiles-dev/dev" $PROPERTIES