Skip to content

Commit 06924d1

Browse files
authored
Merge pull request #27 from liubao68/main
prepare new version 1.0.1-SNAPSHOT
2 parents 4d97094 + 897f7c3 commit 06924d1

File tree

3 files changed

+20
-56
lines changed

3 files changed

+20
-56
lines changed
Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,12 @@
11
#!/bin/bash
22

3-
set -euo pipefail
4-
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-
3+
printf "$GPG_KEY_BASE64" | base64 --decode > gpg.asc
4+
echo ${GPG_PASSPHRASE} | gpg --batch --yes --passphrase-fd 0 --import gpg.asc
5+
gpg -k
6+
7+
./mvnw \
8+
-s settings.xml \
9+
-Pcentral \
10+
-Dmaven.test.skip=true \
11+
-Dgpg.passphrase=${GPG_PASSPHRASE} \
12+
clean deploy -B -D skipITs

pom.xml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<groupId>com.huaweicloud.gaussdb</groupId>
2626
<artifactId>gaussdb-r2dbc</artifactId>
27-
<version>1.0.0-SNAPSHOT</version>
27+
<version>1.0.1-SNAPSHOT</version>
2828
<packaging>jar</packaging>
2929

3030
<name>Reactive Relational Database Connectivity - GaussDB</name>
@@ -579,17 +579,15 @@
579579
</plugin>
580580

581581
<!-- Deploy to Sonatype OSS Nexus -->
582-
583582
<plugin>
584-
<groupId>org.sonatype.plugins</groupId>
585-
<artifactId>nexus-staging-maven-plugin</artifactId>
586-
<version>1.6.13</version>
583+
<groupId>org.sonatype.central</groupId>
584+
<artifactId>central-publishing-maven-plugin</artifactId>
585+
<version>0.8.0</version>
587586
<extensions>true</extensions>
588587
<configuration>
589-
<serverId>sonatype</serverId>
590-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
591-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
592-
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
588+
<publishingServerId>central</publishingServerId>
589+
<autoPublish>true</autoPublish>
590+
<waitUntil>published</waitUntil>
593591
</configuration>
594592
</plugin>
595593
</plugins>
@@ -604,21 +602,14 @@
604602
</plugin>
605603

606604
<plugin>
607-
<groupId>org.sonatype.plugins</groupId>
608-
<artifactId>nexus-staging-maven-plugin</artifactId>
605+
<groupId>org.sonatype.central</groupId>
606+
<artifactId>central-publishing-maven-plugin</artifactId>
609607
</plugin>
610608

611609
</plugins>
612610

613611
</build>
614612

615-
<distributionManagement>
616-
<repository>
617-
<id>sonatype</id>
618-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
619-
</repository>
620-
</distributionManagement>
621-
622613
</profile>
623614

624615
</profiles>

settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<servers>
66
<server>
7-
<id>sonatype</id>
7+
<id>central</id>
88
<username>${env.SONATYPE_USER}</username>
99
<password>${env.SONATYPE_PASSWORD}</password>
1010
</server>

0 commit comments

Comments
 (0)