Repository: incubator-systemml
Updated Branches:
  refs/heads/master 5d84a095a -> b4a4dee76


[MINOR] prompt for PGP passphrase if not exported

Closes #350


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

Branch: refs/heads/master
Commit: b4a4dee762141a9c81353b47841debb3f3ccdd41
Parents: 5d84a09
Author: Christian Kadner <[email protected]>
Authored: Wed Jan 18 02:48:53 2017 -0800
Committer: Luciano Resende <[email protected]>
Committed: Tue Jan 24 08:14:44 2017 -0800

----------------------------------------------------------------------
 dev/release/release-build.sh | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/b4a4dee7/dev/release/release-build.sh
----------------------------------------------------------------------
diff --git a/dev/release/release-build.sh b/dev/release/release-build.sh
index 54152f2..64b41f1 100755
--- a/dev/release/release-build.sh
+++ b/dev/release/release-build.sh
@@ -141,12 +141,12 @@ while [ "${1+defined}" ]; do
 done
 
 
-for env in GPG_PASSPHRASE; do
-  if [ -z "${!env}" ]; then
-    echo "ERROR: $env must be set to run this script"
-    exit_with_usage
-  fi
-done
+if [[ -z "$GPG_PASSPHRASE" ]]; then
+    echo 'The environment variable GPG_PASSPHRASE is not set. Enter the 
passphrase to'
+    echo 'unlock the GPG signing key that will be used to sign the release!'
+    echo
+    stty -echo && printf "GPG passphrase: " && read GPG_PASSPHRASE && printf 
'\n' && stty echo
+fi
 
 if [[ "$RELEASE_PREPARE" == "true" && -z "$RELEASE_VERSION" ]]; then
     echo "ERROR: --releaseVersion must be passed as an argument to run this 
script"
@@ -245,7 +245,7 @@ if [[ "$RELEASE_PREPARE" == "true" ]]; then
     cd $RELEASE_WORK_DIR/incubator-systemml
 
     # Build and prepare the release
-    $MVN $PUBLISH_PROFILES release:clean release:prepare $DRY_RUN 
-Dgpg.passphrase="$GPG_PASSPHRASE" -DskipTests -Darguments="-DskipTests" 
-DreleaseVersion="$RELEASE_VERSION" -DdevelopmentVersion="$DEVELOPMENT_VERSION" 
-Dtag="$RELEASE_TAG"
+    $MVN $PUBLISH_PROFILES release:clean release:prepare $DRY_RUN 
-Darguments="-Dgpg.passphrase=\"$GPG_PASSPHRASE\" -DskipTests" 
-DreleaseVersion="$RELEASE_VERSION" -DdevelopmentVersion="$DEVELOPMENT_VERSION" 
-Dtag="$RELEASE_TAG"
 
     cd $RELEASE_WORK_DIR
 
@@ -282,7 +282,7 @@ if [[ "$RELEASE_PUBLISH" == "true" ]]; then
     cd $RELEASE_WORK_DIR/incubator-systemml
 
     #Deploy scala 2.10
-    mvn 
-DaltDeploymentRepository=apache.releases.https::default::https://repository.apache.org/service/local/staging/deploy/maven2
 clean package gpg:sign install:install deploy:deploy -DskiptTests 
-Darguments="-DskipTests" -Dgpg.passphrase=$GPG_PASSPHRASE $PUBLISH_PROFILES
+    mvn 
-DaltDeploymentRepository=apache.releases.https::default::https://repository.apache.org/service/local/staging/deploy/maven2
 clean package gpg:sign install:install deploy:deploy -DskiptTests 
-Darguments="-DskipTests -Dgpg.passphrase=\"$GPG_PASSPHRASE\"" 
-Dgpg.passphrase="$GPG_PASSPHRASE" $PUBLISH_PROFILES
 
     cd "$BASE_DIR" #exit target
 
@@ -308,7 +308,7 @@ if [[ "$RELEASE_SNAPSHOT" == "true" ]]; then
     fi
 
     #Deploy scala 2.10
-    $MVN 
-DaltDeploymentRepository=apache.snapshots.https::default::https://repository.apache.org/content/repositories/snapshots
 clean package gpg:sign install:install deploy:deploy -DskiptTests 
-Darguments="-DskipTests" -Dgpg.passphrase=$GPG_PASSPHRASE $PUBLISH_PROFILES
+    $MVN 
-DaltDeploymentRepository=apache.snapshots.https::default::https://repository.apache.org/content/repositories/snapshots
 clean package gpg:sign install:install deploy:deploy -DskiptTests 
-Darguments="-DskipTests -Dgpg.passphrase=\"$GPG_PASSPHRASE\"" 
-Dgpg.passphrase="$GPG_PASSPHRASE" $PUBLISH_PROFILES
 
     cd "$BASE_DIR" #exit target
     exit 0

Reply via email to