Skip to content

Commit 8412c34

Browse files
committed
Release to Central Portal
1 parent 93bf33c commit 8412c34

File tree

3 files changed

+39
-41
lines changed

3 files changed

+39
-41
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
3.7.2 (2025-05-28)
55
------------------
66

7+
* First release using Central Portal instead of Legacy OSSRH.
78
* Update `geoip2` dependency.
89

910
3.7.1 (2025-05-23)

dev-bin/release.sh

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -eu -o pipefail
55
changelog=$(cat CHANGELOG.md)
66

77
regex='
8-
([0-9]+\.[0-9]+\.[0-9]+(-[^ ]+)?) \(([0-9]{4}-[0-9]{2}-[0-9]{2})\)
8+
([0-9]+\.[0-9]+\.[0-9]+[a-zA-Z0-9\-]*) \(([0-9]{4}-[0-9]{2}-[0-9]{2})\)
99
-*
1010
1111
((.|
@@ -18,8 +18,8 @@ if [[ ! $changelog =~ $regex ]]; then
1818
fi
1919

2020
version="${BASH_REMATCH[1]}"
21-
date="${BASH_REMATCH[3]}"
22-
notes="$(echo "${BASH_REMATCH[4]}" | sed -n -E '/^[0-9]+\.[0-9]+\.[0-9]+/,$!p')"
21+
date="${BASH_REMATCH[2]}"
22+
notes="$(echo "${BASH_REMATCH[3]}" | sed -n -e '/^[0-9]\+\.[0-9]\+\.[0-9]\+/,$!p')"
2323

2424
if [[ "$date" != $(date +"%Y-%m-%d") ]]; then
2525
echo "$date is not today!"
@@ -53,7 +53,16 @@ popd
5353
mvn versions:display-plugin-updates
5454
mvn versions:display-dependency-updates
5555

56-
read -e -p "Continue given above dependencies? (y/n) " should_continue
56+
read -r -n 1 -p "Continue given above dependencies? (y/n) " should_continue
57+
58+
if [ "$should_continue" != "y" ]; then
59+
echo "Aborting"
60+
exit 1
61+
fi
62+
63+
mvn test
64+
65+
read -r -n 1 -p "Continue given above tests? (y/n) " should_continue
5766

5867
if [ "$should_continue" != "y" ]; then
5968
echo "Aborting"
@@ -64,36 +73,36 @@ page=.gh-pages/index.md
6473
cat <<EOF > $page
6574
---
6675
layout: default
67-
title: MaxMind minFraud Score and Insights Java API
76+
title: MaxMind minFraud Java API
6877
language: java
6978
version: $tag
7079
---
7180
7281
EOF
7382

83+
mvn versions:set -DnewVersion="$version"
84+
7485
perl -pi -e "s/(?<=<version>)[^<]*/$version/" README.md
75-
perl -pi -e "s/(?<=com\.maxmind\.minfraud\:minfraud\:)\d+\.\d+\.\d+[^']*/$version/" README.md
86+
perl -pi -e "s/(?<=com\.maxmind\.minfraud\:minfraud\:)\d+\.\d+\.\d+([\w\-]+)?/$version/" README.md
7687

7788
cat README.md >> $page
7889

79-
if [ -n "$(git status --porcelain)" ]; then
80-
git diff
81-
82-
read -e -p "Commit README.md changes? " should_commit
83-
if [ "$should_commit" != "y" ]; then
84-
echo "Aborting"
85-
exit 1
86-
fi
87-
git add README.md
88-
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
8996
fi
97+
git add README.md pom.xml
98+
git commit -m "Preparing for $version"
99+
100+
mvn clean deploy
90101

91-
# could be combined with the primary build
92-
mvn release:clean
93-
mvn release:prepare -DreleaseVersion="$version" -Dtag="$tag"
94-
mvn release:perform
95102
rm -fr ".gh-pages/doc/$tag"
96-
cp -r target/checkout/target/reports/apidocs ".gh-pages/doc/$tag"
103+
cp -r target/reports/apidocs ".gh-pages/doc/$tag"
104+
rm -f .gh-pages/doc/latest
105+
ln -fs "$tag" .gh-pages/doc/latest
97106

98107
pushd .gh-pages
99108

@@ -105,8 +114,7 @@ echo "Release notes for $version:
105114
$notes
106115
107116
"
108-
109-
read -e -p "Push to origin? " should_push
117+
read -r -n 1 -p "Push to origin? " should_push
110118

111119
if [ "$should_push" != "y" ]; then
112120
echo "Aborting"
@@ -118,8 +126,7 @@ git push
118126
popd
119127

120128
git push
121-
git push --tags
122129

123130
gh release create --target "$(git branch --show-current)" -t "$version" -n "$notes" "$tag" \
124-
"target/checkout/target/minfraud-$version-with-dependencies.zip" \
125-
"target/checkout/target/minfraud-$version-with-dependencies.zip.asc"
131+
"target/minfraud-$version-with-dependencies.zip" \
132+
"target/minfraud-$version-with-dependencies.zip.asc"

pom.xml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -255,24 +255,14 @@
255255
<version>2.18.0</version>
256256
</plugin>
257257
<plugin>
258-
<groupId>org.sonatype.plugins</groupId>
259-
<artifactId>nexus-staging-maven-plugin</artifactId>
260-
<version>1.7.0</version>
258+
<groupId>org.sonatype.central</groupId>
259+
<artifactId>central-publishing-maven-plugin</artifactId>
260+
<version>0.7.0</version>
261261
<extensions>true</extensions>
262262
<configuration>
263-
<serverId>sonatype-nexus-staging</serverId>
264-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
265-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
263+
<publishingServerId>central</publishingServerId>
264+
<autoPublish>true</autoPublish>
266265
</configuration>
267-
<executions>
268-
<execution>
269-
<id>default-deploy</id>
270-
<phase>deploy</phase>
271-
<goals>
272-
<goal>deploy</goal>
273-
</goals>
274-
</execution>
275-
</executions>
276266
</plugin>
277267
</plugins>
278268
</build>

0 commit comments

Comments
 (0)