mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
update
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
a738eed0cd
commit
90bede2f81
|
@ -49,13 +49,18 @@ main(){
|
|||
latest_release=$(echo "$latest_response" | jq -e --raw-output .tag_name)
|
||||
release_id=$(echo "$latest_response" | jq -e --raw-output .id)
|
||||
|
||||
if [[ "$tag_name" != "$latest_release" ]]; then
|
||||
if [[ "$tag_name" != "$latest_release" ]] || [[ "$release_id" == "null" ]]; 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}')
|
||||
response=$(curl -XPOST -sSL -H "${AUTH_HEADER}" -H "${API_HEADER}" "${URI}/repos/${GITHUB_REPOSITORY}/releases" --data '{"tag_name": "'"${tag_name}"'","name":"'"${tag_name}"'","draft":false,"prerelease":false}')
|
||||
release_id=$(echo "$response" | jq -e --raw-output .id)
|
||||
fi
|
||||
|
||||
if [[ "$release_id" == "null" ]]; then
|
||||
echo "Release ID cannot be null."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Upload the files.
|
||||
echo "Uploading files: ${files[*]}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user