Skip to content

Commit bf0a997

Browse files
committed
Release using Central Portal
1 parent 8f46f8a commit bf0a997

File tree

3 files changed

+30
-36
lines changed

3 files changed

+30
-36
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
3.2.0 (2025-05-28)
5+
------------------
6+
7+
* First release using Central Portal instead of Legacy OSSRH.
8+
49
3.1.1 (2024-09-19)
510
------------------
611

dev-bin/release.sh

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ if [ "$should_continue" != "y" ]; then
6060
exit 1
6161
fi
6262

63+
mvn test
64+
65+
read -r -n 1 -p "Continue given above tests? (y/n) " should_continue
66+
67+
if [ "$should_continue" != "y" ]; then
68+
echo "Aborting"
69+
exit 1
70+
fi
71+
6372
page=.gh-pages/index.md
6473
cat <<EOF > $page
6574
---
@@ -71,35 +80,26 @@ version: $tag
7180
7281
EOF
7382

74-
read -r -n 1 -p "Continue given above dependencies? (y/n) " should_continue
75-
76-
if [ "$should_continue" != "y" ]; then
77-
echo "Aborting"
78-
exit 1
79-
fi
83+
mvn versions:set -DnewVersion="$version"
8084

8185
perl -pi -e "s/(?<=<version>)[^<]*/$version/" README.md
8286
perl -pi -e "s/(?<=com\.maxmind\.db\:maxmind-db\:)\d+\.\d+\.\d+([\w\-]+)?/$version/" README.md
8387

8488
cat README.md >> $page
8589

86-
if [ -n "$(git status --porcelain)" ]; then
87-
git diff
88-
89-
read -r -n 1 -p "Commit README.md changes? " should_commit
90-
if [ "$should_commit" != "y" ]; then
91-
echo "Aborting"
92-
exit 1
93-
fi
94-
git add README.md
95-
git commit -m 'update version number in README.md'
90+
git diff
91+
92+
read -r -n 1 -p "Commit changes? " should_commit
93+
if [ "$should_commit" != "y" ]; then
94+
echo "Aborting"
95+
exit 1
9696
fi
97+
git add README.md pom.xml
98+
git commit -m "Preparing for $version"
99+
97100

101+
mvn clean deploy
98102

99-
# could be combined with the primary build
100-
mvn release:clean
101-
mvn release:prepare -DreleaseVersion="$version" -Dtag="$tag"
102-
mvn release:perform
103103
rm -fr ".gh-pages/doc/$tag"
104104
cp -r target/checkout/target/reports/apidocs ".gh-pages/doc/$tag"
105105
rm .gh-pages/doc/latest
@@ -127,6 +127,5 @@ git push
127127
popd
128128

129129
git push
130-
git push --tags
131130

132131
gh release create --target "$(git branch --show-current)" -t "$version" -n "$notes" "$tag"

pom.xml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -163,24 +163,14 @@
163163
<version>2.18.0</version>
164164
</plugin>
165165
<plugin>
166-
<groupId>org.sonatype.plugins</groupId>
167-
<artifactId>nexus-staging-maven-plugin</artifactId>
168-
<version>1.7.0</version>
166+
<groupId>org.sonatype.central</groupId>
167+
<artifactId>central-publishing-maven-plugin</artifactId>
168+
<version>0.7.0</version>
169169
<extensions>true</extensions>
170170
<configuration>
171-
<serverId>sonatype-nexus-staging</serverId>
172-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
173-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
171+
<publishingServerId>central</publishingServerId>
172+
<autoPublish>true</autoPublish>
174173
</configuration>
175-
<executions>
176-
<execution>
177-
<id>default-deploy</id>
178-
<phase>deploy</phase>
179-
<goals>
180-
<goal>deploy</goal>
181-
</goals>
182-
</execution>
183-
</executions>
184174
</plugin>
185175
</plugins>
186176
</build>

0 commit comments

Comments
 (0)