Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env bash
set -u -e -o pipefail
go list -u -m -json all \
| jq -r 'if (.Indirect | not) and .Update then "\(.Path)\t\(.Version)\t\(.Update.Version)" else "" end' \
| sed -E 's/v[0-9]\.0\.0-[0-9]+-//g' \
| sed -E 's/golang.org\/x\//github.com\/golang\//g' \
| while read -r NAME A B
do
if [ -n "$NAME" ]
then
case "$NAME" in
github.com/*)
echo "https://$NAME/compare/$A...$B"
;;
*)
echo "$NAME - $A - $B"
;;
esac
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.