HBASE-24651 release script utils should set local user when GPG_KEY is defined.

closes #1992

Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
This commit is contained in:
Sean Busbey 2020-06-28 00:56:52 -05:00
parent bfec964aef
commit 982bd5fadd
No known key found for this signature in database
GPG Key ID: A926FD051016402D
2 changed files with 4 additions and 2 deletions

View File

@ -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)"

View File

@ -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