@@ -4,7 +4,7 @@ set -euo pipefail
44# You can run it from any directory.
55PROJECT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
66
7- pushd " $PROJECT_DIR "
7+ pushd " $PROJECT_DIR " > /dev/null
88
99# Export "PUBLISH_RELEASE=true" to initiate release process.
1010if [ " ${PUBLISH_RELEASE:- } " != " true" ]; then
@@ -13,22 +13,22 @@ if [ "${PUBLISH_RELEASE:-}" != "true" ]; then
1313else
1414 echo " Launching release publishing process..."
1515
16- if [ -z " $GPG_SECRET_KEYS " ]; then
16+ if [ -z " ${ GPG_SECRET_KEYS:- } " ]; then
1717 echo " Put base64 encoded gpg secret key for signing into GPG_SECRET_KEYS env variable."
1818 exit 1
1919 fi
2020
21- if [ -z " $GPG_OWNERTRUST " ]; then
21+ if [ -z " ${ GPG_OWNERTRUST:- } " ]; then
2222 echo " Put base64 encoded gpg ownertrust for signing into GPG_OWNERTRUST env variable."
2323 exit 1
2424 fi
2525
26- if [ -z " $GPG_KEY_ID " ]; then
26+ if [ -z " ${ GPG_KEY_ID:- } " ]; then
2727 echo " Put GPG key id into GPG_KEY_ID env variable."
2828 exit 1
2929 fi
3030
31- if [ -z " $GPG_PASSPHRASE " ]; then
31+ if [ -z " ${ GPG_PASSPHRASE:- } " ]; then
3232 echo " Put GPG passphrase into GPG_PASSPHRASE env variable."
3333 exit 1
3434 fi
5454 unset GPG_OWNERTRUST
5555
5656 ./gradlew --stacktrace --info build publishToSonatype -Psigning.keyId=" $GPG_KEY_ID " -Psigning.password=" $GPG_PASSPHRASE " -Psigning.secretKeyRingFile=" $HOME /.gnupg/secring.gpg"
57+ unset GPG_PASSPHRASE
5758
5859 # Run closeAndReleaseRepository separately to avoid contention between publishing and closing.
5960 ./gradlew --stacktrace --info closeAndReleaseRepository
0 commit comments