#!/bin/sh
set -e
: ${GO_PIPELINE_COUNTER:?}
: ${GPG_KEYNAME:?}
: ${GPG_PASSPHRASE:?}
: ${PWD:?}
set -x

RELEASE_VERSION=`ruby scripts/get-release-version.rb`

mvn org.codehaus.mojo:versions-maven-plugin:1.3.1:set \
    --batch-mode \
    --errors \
    -DgenerateBackupPoms=false \
    -DnewVersion="$RELEASE_VERSION" \
    --file pom.xml

mvn org.codehaus.mojo:versions-maven-plugin:1.3.1:set \
    --batch-mode \
    --errors \
    -DgenerateBackupPoms=false \
    -DnewVersion="$RELEASE_VERSION" \
    --file parent/pom.xml

mvn clean deploy \
    --batch-mode \
    --errors \
    -Psonatype-oss-release \
    -Dgpg.keyname="$GPG_KEYNAME" \
    -Dgpg.passphrase="$GPG_PASSPHRASE" \
    -DaltDeploymentRepository="staging::default::file://$PWD/staging"

#!/bin/sh
set -e
: ${GO_PIPELINE_COUNTER:?}
: ${GPG_KEYNAME:?}
: ${GPG_PASSPHRASE:?}
: ${PWD:?}
set -x

RELEASE_VERSION=`ruby scripts/get-release-version.rb`

echo "$RELEASE_VERSION" > version

mvn org.codehaus.mojo:versions-maven-plugin:1.3.1:set \
    --batch-mode \
    --errors \
    -DgenerateBackupPoms=false \
    -DnewVersion="$RELEASE_VERSION" \
    --file pom.xml

mvn org.codehaus.mojo:versions-maven-plugin:1.3.1:set \
    --batch-mode \
    --errors \
    -DgenerateBackupPoms=false \
    -DnewVersion="$RELEASE_VERSION" \
    --file parent/pom.xml

mvn clean deploy \
    --batch-mode \
    --errors \
    -Psonatype-oss-release \
    -Dgpg.keyname="$GPG_KEYNAME" \
    -Dgpg.passphrase="$GPG_PASSPHRASE" \
    -DaltDeploymentRepository="staging::default::file://$PWD/staging"

Save release version to a file
Save release version to a file
