2021-02-11 21:35:36 +01:00
|
|
|
#!/bin/bash
|
2021-05-19 14:06:42 +02:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Copyright 2021 The Netty Project
|
|
|
|
#
|
|
|
|
# The Netty Project licenses this file to you under the Apache License,
|
|
|
|
# version 2.0 (the "License"); you may not use this file except in compliance
|
|
|
|
# with the License. You may obtain a copy of the License at:
|
|
|
|
#
|
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
# ----------------------------------------------------------------------------
|
2021-02-11 21:35:36 +01:00
|
|
|
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
|
2021-05-19 11:43:06 +02:00
|
|
|
echo "Tag $2 already existed locally, deleting it"
|
|
|
|
git tag -d "$2"
|
2021-02-17 21:27:27 +01:00
|
|
|
fi
|
|
|
|
|
2021-02-11 21:35:36 +01:00
|
|
|
git fetch
|
|
|
|
git checkout "$2"
|
|
|
|
|
|
|
|
export JAVA_HOME="$JAVA8_HOME"
|
|
|
|
|
2021-03-30 12:03:14 +02:00
|
|
|
./mvnw -Psonatype-oss-release -am -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
|
2021-02-11 21:35:36 +01:00
|
|
|
|
2021-06-10 10:19:18 +02:00
|
|
|
./mvnw -Psonatype-oss-release,full,uber-staging -pl all 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-11 21:35:36 +01:00
|
|
|
|
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"
|