Repository: bahir Updated Branches: refs/heads/master bce9cd159 -> 8ad556e63
[MINOR] Prompt for PGP passphrase when not exported The Release plugin forks the current Maven session but does not propagated the system properties to the forked Maven session. Therefore we need to pass the "-Dgpg.passphrase" wrapped inside the "-Darguments" parameter. http://maven.apache.org/plugins/maven-gpg-plugin/usage.html Prompt for the GPG passphrase if the GPG_PASSPHRASE environment variable was not exported. Closes #34 Project: http://git-wip-us.apache.org/repos/asf/bahir/repo Commit: http://git-wip-us.apache.org/repos/asf/bahir/commit/8ad556e6 Tree: http://git-wip-us.apache.org/repos/asf/bahir/tree/8ad556e6 Diff: http://git-wip-us.apache.org/repos/asf/bahir/diff/8ad556e6 Branch: refs/heads/master Commit: 8ad556e63275cc42a15b3ff34c5e58eacdbfc6b1 Parents: bce9cd1 Author: Christian Kadner <[email protected]> Authored: Tue Jan 17 12:26:52 2017 -0800 Committer: Christian Kadner <[email protected]> Committed: Thu Jan 19 20:15:14 2017 -0800 ---------------------------------------------------------------------- dev/release-build.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bahir/blob/8ad556e6/dev/release-build.sh ---------------------------------------------------------------------- diff --git a/dev/release-build.sh b/dev/release-build.sh index 06762cf..509bede 100755 --- a/dev/release-build.sh +++ b/dev/release-build.sh @@ -143,12 +143,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 +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 -done if [[ "$RELEASE_PREPARE" == "true" && -z "$RELEASE_VERSION" ]]; then echo "ERROR: --releaseVersion must be passed as an argument to run this script" @@ -247,7 +247,7 @@ if [[ "$RELEASE_PREPARE" == "true" ]]; then cd target/bahir # Build and prepare the release - $MVN $PUBLISH_PROFILES release:clean release:prepare $DRY_RUN -Dgpg.passphrase="$GPG_PASSPHRASE" -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 .. #exit bahir
