Skip to content

Instantly share code, notes, and snippets.

@JamieMagee
Created June 10, 2022 15:51
Show Gist options
  • Save JamieMagee/30f42d55973c9e3753bf411c113a26a1 to your computer and use it in GitHub Desktop.
Save JamieMagee/30f42d55973c9e3753bf411c113a26a1 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -euo pipefail
tags=$(curl --silent https://mcr.microsoft.com/v2/dotnet/sdk/tags/list | jq -r '.tags[] | select(index("7.0"))')
for tag in $tags
do
echo -ne "\033[K$tag\r"
response=$(curl --write-out '%{http_code}' --silent --output /dev/null https://mcr.microsoft.com/v2/dotnet/sdk/manifests/$tag)
if [[ $response == "404" ]]; then
echo -ne "$tag\r\n"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment