You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ke...@apache.org on 2012/10/12 04:25:50 UTC

[38/50] git commit: adding an option to the build script to permit setting a pgp key with which to sign

adding an option to the build script to permit setting a pgp key with which to sign


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/bae835d6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/bae835d6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/bae835d6

Branch: refs/heads/javelin
Commit: bae835d6c3d968e56fb1faaf6bd5a075cfcef01c
Parents: 03fcc26
Author: David Nalley <da...@gnsa.us>
Authored: Fri Oct 5 00:27:58 2012 -0400
Committer: David Nalley <da...@gnsa.us>
Committed: Fri Oct 5 00:27:58 2012 -0400

----------------------------------------------------------------------
 tools/build/build_asf.sh |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bae835d6/tools/build/build_asf.sh
----------------------------------------------------------------------
diff --git a/tools/build/build_asf.sh b/tools/build/build_asf.sh
index 41c968a..52f82a6 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