From 982bd5fadda4d4d1a4983033fccc87a5d806bf0d Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Sun, 28 Jun 2020 00:56:52 -0500 Subject: [PATCH] HBASE-24651 release script utils should set local user when GPG_KEY is defined. closes #1992 Signed-off-by: Nick Dimiduk --- dev-support/create-release/do-release.sh | 2 -- dev-support/create-release/release-util.sh | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dev-support/create-release/do-release.sh b/dev-support/create-release/do-release.sh index 7e5f18637c3..ebab9335cc2 100755 --- a/dev-support/create-release/do-release.sh +++ b/dev-support/create-release/do-release.sh @@ -67,7 +67,6 @@ if [ "$RUNNING_IN_DOCKER" = "1" ]; then if [ -d "output" ]; then cd output fi - GPG_ARGS=("${GPG_ARGS[@]}" --local-user "${GPG_KEY}") echo "GPG Version: $("${GPG}" "${GPG_ARGS[@]}" --version)" # Inside docker, need to import the GPG key stored in the current directory. if ! $GPG "${GPG_ARGS[@]}" --import "$SELF/gpg.key.public" ; then @@ -85,7 +84,6 @@ if [ "$RUNNING_IN_DOCKER" = "1" ]; then else # Outside docker, need to ask for information about the release. get_release_info - GPG_ARGS=("${GPG_ARGS[@]}" --local-user "${GPG_KEY}") fi GPG_TTY="$(tty)" diff --git a/dev-support/create-release/release-util.sh b/dev-support/create-release/release-util.sh index b9b79ea9157..6bec354da98 100755 --- a/dev-support/create-release/release-util.sh +++ b/dev-support/create-release/release-util.sh @@ -20,6 +20,9 @@ DRY_RUN=${DRY_RUN:-1} #default to dry run DEBUG=${DEBUG:-0} GPG=${GPG:-gpg} GPG_ARGS=(--no-autostart --batch) +if [ -n "${GPG_KEY}" ]; then + GPG_ARGS=("${GPG_ARGS[@]}" --local-user "${GPG_KEY}") +fi # Maven Profiles for publishing snapshots and release to Maven Central and Dist PUBLISH_PROFILES=("-P" "apache-release,release") @@ -256,6 +259,7 @@ EOF echo "Exiting." exit 1 fi + GPG_ARGS=("${GPG_ARGS[@]}" --local-user "${GPG_KEY}") if ! is_dry_run; then if [ -z "$ASF_PASSWORD" ]; then