File tree Expand file tree Collapse file tree 1 file changed +19
-35
lines changed
Expand file tree Collapse file tree 1 file changed +19
-35
lines changed Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5- VERSION=$( ./mvnw org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version -o | grep -v INFO)
6-
7- if [[ $VERSION =~ .* -SNAPSHOT$ ]] ; then
8-
9- echo " Cannot deploy a snapshot: $VERSION "
10- exit 1
11- fi
12-
13- if [[ $VERSION =~ ^(\d +\. )+ (RC(\d +)| M(\d +)| RELEASE)$ ]] ; then
14-
15- #
16- # Prepare GPG Key is expected to be in base64
17- # Exported with gpg -a --export-secret-keys "your@email" | base64 > gpg.base64
18- #
19- printf " $GPG_KEY_BASE64 " | base64 --decode > gpg.asc
20- echo ${GPG_PASSPHRASE} | gpg --batch --yes --passphrase-fd 0 --import gpg.asc
21- gpg -k
22-
23- #
24- # Stage on Maven Central
25- #
26- echo " Staging $VERSION to Maven Central"
27-
28- ./mvnw \
29- -s settings.xml \
30- -Pcentral \
31- -Dmaven.test.skip=true \
32- -Dgpg.passphrase=${GPG_PASSPHRASE} \
33- clean deploy -B -D skipITs
34- else
35-
36- echo " Not a release: $VERSION "
37- exit 1
38- fi
39-
5+ #
6+ # Prepare GPG Key is expected to be in base64
7+ # Exported with gpg -a --export-secret-keys "your@email" | base64 > gpg.base64
8+ #
9+ printf " $GPG_KEY_BASE64 " | base64 --decode > gpg.asc
10+ echo ${GPG_PASSPHRASE} | gpg --batch --yes --passphrase-fd 0 --import gpg.asc
11+ gpg -k
12+
13+ #
14+ # Stage on Maven Central
15+ #
16+ echo " Staging $VERSION to Maven Central"
17+
18+ ./mvnw \
19+ -s settings.xml \
20+ -Pcentral \
21+ -Dmaven.test.skip=true \
22+ -Dgpg.passphrase=${GPG_PASSPHRASE} \
23+ clean deploy -B -D skipITs
You can’t perform that action at this time.
0 commit comments