diff --git a/warp10/build.gradle b/warp10/build.gradle index fbc2c47ec..bc4857f80 100644 --- a/warp10/build.gradle +++ b/warp10/build.gradle @@ -183,7 +183,7 @@ task pack(type: Jar) { // task createTarArchive(type: Exec, dependsOn: pack) { workingDir '.' - commandLine "${projectDir}/src/main/sh/package.sh", version, projectDir + commandLine "${projectDir}/src/main/sh/package.sh", version, projectDir, project.getProperties().get("signing.gnupg.keyName") outputs.file "${buildDir}/libs/warp10-${version}.tar.gz" } diff --git a/warp10/src/main/sh/package.sh b/warp10/src/main/sh/package.sh index adfa210bf..9ed36e5ab 100755 --- a/warp10/src/main/sh/package.sh +++ b/warp10/src/main/sh/package.sh @@ -32,7 +32,7 @@ set -eu VERSION=$1 if [ -z "${VERSION:+x}" ]; then - echo "Usage: $0 VERSION WARP_ROOT_PATH" + echo "Usage: $0 VERSION WARP_ROOT_PATH GPG_KEY_NAME" exit 1 fi WARP10_HOME=warp10-${VERSION} @@ -40,7 +40,7 @@ WARP10_HOME=warp10-${VERSION} # Warp 10 root project path (../warp10) WARP_ROOT_PATH=$2 if [ -z "${WARP_ROOT_PATH:+x}" ]; then - echo "Usage: $0 VERSION WARP_ROOT_PATH" + echo "Usage: $0 VERSION WARP_ROOT_PATH GPG_KEY_NAME" exit 1 fi if [ ! -d "${WARP_ROOT_PATH}" ]; then @@ -48,6 +48,12 @@ if [ ! -d "${WARP_ROOT_PATH}" ]; then exit 1 fi +GPG_KEY_NAME=$3 +if [ -z "${GPG_KEY_NAME:+x}" ]; then + echo "Usage: $0 VERSION WARP_ROOT_PATH GPG_KEY_NAME" + exit 1 +fi + ARCHIVE=${WARP_ROOT_PATH}/archive # Remove existing archive dir @@ -117,7 +123,7 @@ FILE=../build/libs/warp10-${VERSION}.tar.gz tar czpf "${FILE}" "${WARP10_HOME}" # Generate signature -gpg --local-user BD49DA0A --output "${FILE}".asc --detach-sign "${FILE}" +gpg --local-user "${GPG_KEY_NAME}" --output "${FILE}".asc --detach-sign "${FILE}" # Generate hash sha512sum "${FILE}" | sed -e "s@ .*/@ @" > "${FILE}".sha512