diff options
Diffstat (limited to 'Swift')
-rwxr-xr-x | Swift/Packaging/Source/package.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Swift/Packaging/Source/package.sh b/Swift/Packaging/Source/package.sh index 16a9a1f..3872b35 100755 --- a/Swift/Packaging/Source/package.sh +++ b/Swift/Packaging/Source/package.sh @@ -3,9 +3,13 @@ ## For a Swiften-only tarball, try ## EXCLUDE_FOLDERS="Swift Sluift Limber Slimber" ./package.sh +## This script will require GPG and a suitable signing key by default. +## To disable tarball signature generation, pass the --nosign parameter to package.sh. + export PYTHONPATH=../../../BuildTools/SCons VERSION=`../../../BuildTools/GetBuildVersion.py swift` DIRNAME=swift-$VERSION +FIRST_ARGUMENT=$1 if [ -z "$VERSION" ]; then echo "Unable to determine version" @@ -40,3 +44,20 @@ done echo "Creating tarball ..." $TAR -czf $DIRNAME.tar.gz --owner=swift --group=swift $DIRNAME + +if [ "$FIRST_ARGUMENT" != "--nosign" ]; then + echo "Creating armored GPG signature ..." + which gpg + if [ $? -eq 0 ]; then + gpg --list-keys packages@swift.im + if [ $? -eq 0 ]; then + gpg --armor --default-key packages@swift.im --detach-sign $DIRNAME.tar.gz + else + echo "Key for packages@swift.im missing. Not signing tar archive." + exit 1 + fi + else + echo "GPG not found. Not signing tar archive." + exit 1 + fi +fi
\ No newline at end of file |