2021-02-11 21:35:36 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ "$#" -ne 2 ]; then
|
|
|
|
echo "Expected staging profile id and branch name, login into oss.sonatype.org to retrieve it"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
OS=$(uname)
|
|
|
|
|
|
|
|
if [ "$OS" != "Darwin" ]; then
|
|
|
|
echo "Needs to be executed on macOS"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
BRANCH=$(git branch --show-current)
|
|
|
|
|
2021-02-17 21:27:27 +01:00
|
|
|
if git tag | grep -q "$2" ; then
|
|
|
|
echo "Tag $2 already exists"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-02-11 21:35:36 +01:00
|
|
|
git fetch
|
|
|
|
git checkout "$2"
|
|
|
|
|
|
|
|
export JAVA_HOME="$JAVA8_HOME"
|
|
|
|
|
|
|
|
./mvnw -Psonatype-oss-release -pl resolver-dns-native-macos,transport-native-unix-common,transport-native-kqueue clean package gpg:sign org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DstagingRepositoryId="$1" -DnexusUrl=https://oss.sonatype.org -DserverId=sonatype-nexus-staging -DskipTests=true
|
|
|
|
|
|
|
|
./mvnw -Psonatype-oss-release,full,uber-staging -pl all,tarball clean package gpg:sign org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DstagingRepositoryId="$1" -DnexusUrl=https://oss.sonatype.org -DserverId=sonatype-nexus-staging -DskipTests=true
|
|
|
|
|
2021-02-22 08:04:22 +01:00
|
|
|
./mvnw org.sonatype.plugins:nexus-staging-maven-plugin:rc-close org.sonatype.plugins:nexus-staging-maven-plugin:rc-release -DstagingRepositoryId="$1" -DnexusUrl=https://oss.sonatype.org -DserverId=sonatype-nexus-staging -DskipTests=true -DstagingProgressTimeoutMinutes=10
|
2021-02-18 08:38:42 +01:00
|
|
|
|
2021-02-11 21:35:36 +01:00
|
|
|
git checkout "$BRANCH"
|