From b810c1032b0c7a2ec3d6245dc06e81a8d8853c8f Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sat, 18 Oct 2014 15:56:31 -0400 Subject: [PATCH] Include signed version in release package. --- .gitignore | 1 + MasterPassword/C/distribute | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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."