diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..53b27f3 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @thomasf147 @zuzmaczek @sunsee18 @GSvensk @gkvasnsinch diff --git a/pom.xml b/pom.xml index 52873d9..ca87736 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.sinch sdk-sms - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT jar SDK for Sinch SMS Library providing a Java API for the Sinch HTTP REST Messaging API. @@ -20,6 +20,68 @@ + + + internal-release + + + useInternalRepo + true + + + + + + + clx-releases + ${env.REPO_URL}/repository/clx-releases-hosted/ + + + clx-snapshots + ${env.REPO_URL}/repository/clx-snapshots-hosted/ + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + true + + clx-releases + ${env.REPO_URL} + true + + + + + + + + public-release + + + !useInternalRepo + + + + + + + ossrh + Maven Central Staging Repository + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + ossrh + Maven Central Snapshot Repository + https://oss.sonatype.org/content/repositories/snapshots + + + + + https://github.com/sinch/sinch-java-sms scm:git:git://github.com/sinch/sinch-java-sms.git @@ -63,22 +125,8 @@ ${basedir}/suppression.xml - - - ossrh - Maven Central Snapshot Repository - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - Maven Central Staging Repository - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - org.apache.maven.plugins maven-source-plugin @@ -119,7 +167,15 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 3.0.1 + + ${env.GPG_PASSPHRASE} + + --batch + --pinentry-mode + loopback + + sign-artifacts @@ -213,9 +269,8 @@ true v@{project.version} - false - release - deploy + true + internal-release diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..7cb5ec3 --- /dev/null +++ b/release.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +set -eu + +INTERNAL_RELEASE=true + +# Parses command line arguments +# If called with -p, a public release is made +# If called with -h, help text is displayed +# If called without any arg, an internal release is made +while getopts 'ph' OPTION; do + case "$OPTION" in + p) + INTERNAL_RELEASE=false + ;; + ?) + echo "Makes an internal release, unless -p (public) flag is set. script usage: $(basename "$0") [-h] [-p]" >&2 + exit 1 + ;; + esac +done +shift "$((OPTIND -1))" + +# Checks that required environment variables are set +[ -z "$REPO_URL" ] && echo "Need to set REPO_URL" && exit 1; +[ -z "$GPG_PASSPHRASE" ] && echo "Need to set GPG_PASSPHRASE" && exit 1; + +if [ "$INTERNAL_RELEASE" = true ] ; then + echo "Making internal release" +else + echo "Making public release" +fi + +# Make release +mvn release:clean +mvn release:prepare --batch-mode "-Darguments=-DskipTests -Ddependency-check.skip=true" +mvn release:perform "-Darguments=-DskipTests -DuseInternalRepo=${INTERNAL_RELEASE}"