Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release.sh] Use git configured gpg binary if one is set #5826

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions build-support/bin/release.sh
Expand Up @@ -377,7 +377,7 @@ EOM
)
get_pgp_keyid &> /dev/null || die "${msg}"
echo "Found the following key for release signing:"
gpg -k $(get_pgp_keyid)
$(get_pgp_program) -k $(get_pgp_keyid)
read -p "Is this the correct key? [Yn]: " answer
[[ "${answer:-y}" =~ [Yy]([Ee][Ss])? ]] || die "${msg}"
}
Expand All @@ -386,6 +386,10 @@ function get_pgp_keyid() {
git config --get user.signingkey
}

function get_pgp_program() {
git config --get gpg.program || echo "gpg"
}

function tag_release() {
release_version="${PANTS_STABLE_VERSION}" && \
tag_name="release_${release_version}" && \
Expand Down Expand Up @@ -640,8 +644,8 @@ function publish_packages() {
activate_twine
trap deactivate RETURN

twine upload --sign --identity=$(get_pgp_keyid) "${DEPLOY_PANTS_WHEEL_DIR}/${PANTS_STABLE_VERSION}"/*.whl
twine upload --sign --identity=$(get_pgp_keyid) "${DEPLOY_PANTS_SDIST_DIR}/${PANTS_STABLE_VERSION}"/*.tar.gz
twine upload --sign --sign-with=$(get_pgp_program) --identity=$(get_pgp_keyid) "${DEPLOY_PANTS_WHEEL_DIR}/${PANTS_STABLE_VERSION}"/*.whl
twine upload --sign --sign-with=$(get_pgp_program) --identity=$(get_pgp_keyid) "${DEPLOY_PANTS_SDIST_DIR}/${PANTS_STABLE_VERSION}"/*.tar.gz

end_travis_section
}
Expand Down