Skip to content

Commit

Permalink
HBASE-24651 release script utils should set local user when GPG_KEY i…
Browse files Browse the repository at this point in the history
…s defined.

closes #1992

Signed-off-by: Nick Dimiduk <[email protected]>
  • Loading branch information
busbey committed Jun 30, 2020
1 parent bfec964 commit 982bd5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions dev-support/create-release/do-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)"
Expand Down
4 changes: 4 additions & 0 deletions dev-support/create-release/release-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 982bd5f

Please sign in to comment.