From bae835d6c3d968e56fb1faaf6bd5a075cfcef01c Mon Sep 17 00:00:00 2001 From: David Nalley Date: Fri, 5 Oct 2012 00:27:58 -0400 Subject: [PATCH] adding an option to the build script to permit setting a pgp key with which to sign --- tools/build/build_asf.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/build/build_asf.sh b/tools/build/build_asf.sh index 41c968a4c12..52f82a6c710 100755 --- a/tools/build/build_asf.sh +++ b/tools/build/build_asf.sh @@ -23,7 +23,6 @@ branch='master' tag='no' certid='X' - usage(){ echo "usage: $0 -v version [-b branch] [-s source dir] [-o output dir] [-t [-u]] [-h]" echo " -v sets the version" @@ -31,11 +30,12 @@ usage(){ echo " -s sets the source directory (defaults to $sourcedir)" echo " -o sets the output directory (defaults to $outputdir)" echo " -t tags the git repo with the version" - echo " -u sets the certificate ID to sign the tag with (if not provided, the default key is attempted)" + echo " -u sets the certificate ID to sign the tag with (if not provided, the default key is attempted)" + echo " -k sets the key to sign the tarball with" echo " -h" } -while getopts v:s:o:b:tu:h opt +while getopts v:s:o:b:tu:k:h opt do case "$opt" in v) version="$OPTARG";; @@ -44,9 +44,10 @@ do b) branch="$OPTARG";; t) tag='yes';; u) certid="$OPTARG";; + k) keyid="--default-key $OPTARG";; h) usage exit 0;; - \?) # unknown flag + /?) # unknown flag usage exit 1;; esac @@ -73,11 +74,10 @@ else fi if [ -d "$outputdir" ]; then - rm $outputdir/* + rm -r $outputdir/* else mkdir $outputdir fi - cp $sourcedir/KEYS $outputdir/KEYS cd $sourcedir @@ -87,8 +87,8 @@ git archive --format=zip --prefix=apache-cloudstack-$version-incubating-src/ $br cd $outputdir echo 'armor' -gpg -v --armor --output apache-cloudstack-$version-incubating-src.tar.gz.asc --detach-sig apache-cloudstack-$version-incubating-src.tar.gz -gpg -v --armor --output apache-cloudstack-$version-incubating-src.zip.asc --detach-sig apache-cloudstack-$version-incubating-src.zip +gpg -v $keyid --armor --output apache-cloudstack-$version-incubating-src.tar.gz.asc --detach-sig apache-cloudstack-$version-incubating-src.tar.gz +gpg -v $keyid --armor --output apache-cloudstack-$version-incubating-src.zip.asc --detach-sig apache-cloudstack-$version-incubating-src.zip echo 'md5' gpg -v --print-md MD5 apache-cloudstack-$version-incubating-src.tar.gz > apache-cloudstack-$version-incubating-src.tar.gz.md5