a98293f084
Motivation: Doing releases manually is error-prone, it would be better if we could do it via a workflow Modification: - Add workflow to cut releases - Add related scripts Result: Be able to easily cut a release via a workflow
28 lines
942 B
Bash
Executable File
28 lines
942 B
Bash
Executable File
#!/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)
|
|
|
|
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
|
|
|
|
git checkout "$BRANCH"
|