Skip to content

Commit 58043ec

Browse files
authored
Merge pull request #7 from liubao68/work
remove version check
2 parents 34bd3ca + 199c42e commit 58043ec

File tree

1 file changed

+19
-35
lines changed

1 file changed

+19
-35
lines changed

ci/build-and-deploy-to-maven-central.sh

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,22 @@
22

33
set -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

0 commit comments

Comments
 (0)