Skip to content

Instantly share code, notes, and snippets.

@maxime-rainville
Created May 14, 2018 06:13
Show Gist options
  • Save maxime-rainville/632f4f7e2b5674ae5986ce6d623137f1 to your computer and use it in GitHub Desktop.
Save maxime-rainville/632f4f7e2b5674ae5986ce6d623137f1 to your computer and use it in GitHub Desktop.
Simple script thate return the MD5 hash of a files for all tag versions.
tags=`git tag -l --sort=v:refname | grep "^[34]\.[0-9]*\.[0-9]*$"`
oldhash="unset"
for tag in $tags; do
git checkout $tag > /dev/null 2>&1
md5=($(md5sum $1)) > /dev/null 2>&1
if [ "$md5" != "$oldhash" ]
then
echo \"$tag\" \=\> \"$md5\"
oldhash=$md5
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment