Skip to content

Commit

Permalink
Fix syntax for docker hub delete curl command
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlewis committed Feb 21, 2024
1 parent 2806af8 commit f1b1915
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/unpublish-temp-tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ unpublish_group() {
fi
for variant in "${variants[@]}"; do
echo "Deleting heroku/heroku:${stackVersion}${variant}${targetTagSuffix}"
code=$(curl -s -f -X DELETE -H "Authorization: JWT ${dockerhub_token}" --write-out "%{http_code}"
"https://hub.docker.com/v2/repositories/heroku/heroku/tags/${stackVersion}${variant}${targetTagSuffix}/")
code=$(curl -s -f -X DELETE \
-H "Authorization: JWT ${dockerhub_token}" --write-out "%{http_code}" \
"https://hub.docker.com/v2/repositories/heroku/heroku/tags/${stackVersion}${variant}${targetTagSuffix}/"
)

if (( code != 404 )) || (( code != 200 )) || (( code != 201 )); then
echo "Couldn't delete heroku/heroku:${stackVersion}${variant}${targetTagSuffix}: ${code}"
Expand Down

0 comments on commit f1b1915

Please sign in to comment.