From fa3c2369b5b8799435a5fc0a3ec7bc550cb9da3d Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Wed, 14 Jul 2021 16:28:27 +0200 Subject: [PATCH] [Project] get signing key from git config --- deploy.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 4d0c701c5..4a0d267f2 100755 --- a/deploy.sh +++ b/deploy.sh @@ -19,10 +19,11 @@ if [ $# != 1 ] ; then exit 1 fi +gpgKeyName="$(git config --get user.signingkey)" # Confirm releaseVersion=${1} -echo -e "INFO: Do you want to deploy version ${releaseVersion} to Maven Central? y/n" +echo -e "INFO: Do you want to deploy version ${releaseVersion} to Maven Central, signing with ${gpgKeyName}? y/n" read a if [[ "${a}" != "y" && "${a}" != "Y" ]] ; then exit 0; @@ -58,7 +59,7 @@ trap cleanup EXIT # Build and deploy echo -e "\nINFO: Building and deploying to Maven Central..." -if ! mvn clean deploy -DskipTests -Pdeploy ; then +if ! mvn clean deploy -DskipTests -Pdeploy -Dgpg.keyname=${gpgKeyName} ; then echo -e "ERROR: Failed to build and deploy to Maven Central!" exit 1 fi