mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
updates
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
0ee7b3e78a
commit
ef0a7f463f
|
@ -5,4 +5,4 @@
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
script:
|
script:
|
||||||
- ./test.sh
|
- make test
|
||||||
|
|
|
@ -37,8 +37,8 @@ main(){
|
||||||
# Get the tags.
|
# Get the tags.
|
||||||
tag_response=$(curl -sSL -H "${AUTH_HEADER}" -H "${API_HEADER}" "${URI}/repos/${GITHUB_REPOSITORY}/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_name=$(echo "$tag_response" | jq -e --raw-output .[0].name)
|
||||||
tag_id=$(echo $tag_response | jq -e --raw-output .[0].id)
|
tag_id=$(echo "$tag_response" | jq -e --raw-output .[0].id)
|
||||||
|
|
||||||
# Get the latest release.
|
# Get the latest release.
|
||||||
latest_response=$(curl -sSL -H "${AUTH_HEADER}" -H "${API_HEADER}" "${URI}/repos/${GITHUB_REPOSITORY}/releases/latest")
|
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
|
if [[ "$tag_name" != "$latest_release" ]]; then
|
||||||
# Create the release.
|
# Create the release.
|
||||||
echo "Creating release for tag name: ${tag_name}"
|
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}')
|
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)
|
release_id=$(echo "$response" | jq -e --raw-output .id)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Upload the files.
|
# Upload the files.
|
||||||
echo "Uploading files: ${files[@]}"
|
echo "Uploading files: ${files[*]}"
|
||||||
echo "For tag name: ${tag_name} tag id: ${tag_id}"
|
echo "For tag name: ${tag_name} tag id: ${tag_id}"
|
||||||
|
|
||||||
for file in ${files[@]}; do
|
for file in "${files[@]}"; do
|
||||||
filename=$(basename "$file")
|
filename=$(basename "$file")
|
||||||
curl -XPOST -sSL -H "${AUTH_HEADER}" -H "${API_HEADER}" \
|
curl -XPOST -sSL -H "${AUTH_HEADER}" \
|
||||||
--data-binary @"$file" \
|
--data-binary @"$file" \
|
||||||
-H "Content-Type: application/octet-stream" \
|
-H "Content-Type: application/octet-stream" \
|
||||||
"https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${release_id}/assets?name=${filename}"
|
"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!"
|
echo "Uploading assets to ${tag_name} complete!"
|
||||||
}
|
}
|
||||||
|
|
||||||
main $@
|
main "$@"
|
||||||
|
|
|
@ -27,4 +27,5 @@ fi
|
||||||
|
|
||||||
PROPERTIES="$PROPERTIES --jvm_flag=-Dcom.google.gitiles.sourcePath=$ROOT"
|
PROPERTIES="$PROPERTIES --jvm_flag=-Dcom.google.gitiles.sourcePath=$ROOT"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086
|
||||||
exec "${ROOT}/bin/gitiles-dev/dev" $PROPERTIES
|
exec "${ROOT}/bin/gitiles-dev/dev" $PROPERTIES
|
||||||
|
|
Loading…
Reference in New Issue
Block a user