Skip to content

Instantly share code, notes, and snippets.

@rhowe
Last active July 21, 2023 14:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhowe/987b5234c2818ab4143f677e293608cf to your computer and use it in GitHub Desktop.
Save rhowe/987b5234c2818ab4143f677e293608cf to your computer and use it in GitHub Desktop.
Generate a digest of the AWS Java SDK changelog
curl -sf https://raw.githubusercontent.com/aws/aws-sdk-java/master/CHANGELOG.md |\
sed \
-e 's/Amazon Simple Storage Service/Amazon S3/' \
-e 's/^# /- /' \
-e 's/^## / - ## /' \
-e "s/#.*/'&'/" \
-e 's/: / - /g' \
-e 's/^ \(.*\)/ \1/' \
-e 's/^ -/ -/' \
-e 's/^ -/ -/' \
-e 's/^ -.*/&:/' \
-e 's/^ -.*/ &:/' \
-e 's/^-.*/&:/' \
-e '/^$/d' | docker run --security-opt=no-new-privileges --cap-drop all --network none --rm -i mikefarah/yq -o=json |\
jq -r '[.[][][]]|[.[] | to_entries] | flatten | reduce .[] as $dot ({}; .[$dot.key] += $dot.value)|map_values(reduce .[] as $item ([]; . += $item[]))|to_entries|.[]|[.key, .value[]]|.[]' |\
sed -e '/^[^#]/s/^/- /'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment