diff --git a/.gitignore b/.gitignore index fb03d1bd..ad3c78b2 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ Press/MasterPassword_PressKit/MasterPassword_pressrelease_*.pdf MasterPassword/Java/**/target # C +MasterPassword/C/VERSION MasterPassword/C/*.o MasterPassword/C/mpw-*.tar.gz MasterPassword/C/mpw diff --git a/MasterPassword/C/distribute b/MasterPassword/C/distribute index 614ad02a..279b5b27 100755 --- a/MasterPassword/C/distribute +++ b/MasterPassword/C/distribute @@ -2,7 +2,12 @@ set -e cd "${BASH_SOURCE%/*}" -mpwArchive=mpw-$(git describe --tags --long --dirty).tar.gz +tag=$(git describe) +commit=$(git describe --long --dirty) +[[ $tag && $commit = $tag-* ]] || exit 1 +git show --show-signature --pretty=format:%H --quiet "$tag" > VERSION + +mpwArchive=mpw-$commit.tar.gz [[ -e $mpwArchive ]] && echo "WARNING: $mpwArchive already exists. Will overwrite." read -n1 -p "Will prepare and release $mpwArchive. Press a key to continue or ^C to abort."