Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
.settings
doc
hs_err*.log
pom.xml.versionsBackup
target
reports
Test.java
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CHANGELOG
=========

4.3.1 (2025-05-28)
------------------

* First release using Central Portal instead of Legacy OSSRH.
* Dependency updates.

4.3.0 (2025-05-05)
------------------

Expand Down
39 changes: 1 addition & 38 deletions README.dev.md
Original file line number Diff line number Diff line change
@@ -1,38 +1 @@
There is a release script at `dev-bin/release.sh` that will do the full
release, including updating the GitHub Pages site.

This script reads the VERSION number from `CHANGELOG.md`, which you should
have updated to contain the new version number and today's date. After
uploading with this script, you will need to perform the release on the
[Sonatype OSS site](https://oss.sonatype.org/index.html).

We release to the Maven Central Repository through Sonatype OSSRH. They
provide [detailed directions](https://central.sonatype.org/pages/apache-maven.html)
on the steps of the release or snapshot release process.

All releases should follow [Semantic Versioning](https://semver.org/).

Steps for releasing:

1. Review open issues and PRs to see if any can easily be fixed, closed, or
merged.
2. Bump copyright year in `README.md`, if necessary.
* You do not need to update the version. The release script will do so.
3. Review `CHANGELOG.md` for completeness and correctness. Update its release
date. Commit it.
4. Install or update [gh](https://github.com/cli/cli) as it used by the release script.
5. Test that `mvn package` can complete successfully. Run `git clean -dxff`
or something similar to clean up afterwards.
6. Run `./dev-bin/release.sh`.
* This will package the release, update the gh-pages branch, bump the
version to the next development release, upload the release to GitHub
and tag it, and upload to Sonatype.
* It may prompt you about out of date dependencies. You should consider
updating them if appropriate. Say no and review the changes and upate
`pom.xml` and start the release process over again if you do.
7. The `nexus-staging-maven-plugin` will automatically promote the release on Sonatype.

There is more information in the
[minfraud-api-java](https://github.com/maxmind/minfraud-api-java/blob/main/README.dev.md)
`README.dev.md` about doing a Java release, including setting up your
environment and completing the release on Sonatype.
See the [`README.dev.md` in `minfraud-api-java`](https://github.com/maxmind/minfraud-api-java/blob/main/README.dev.md).
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To do this, add the dependency to your pom.xml:
<dependency>
<groupId>com.maxmind.geoip2</groupId>
<artifactId>geoip2</artifactId>
<version>4.3.0</version>
<version>4.3.1</version>
</dependency>
```

Expand All @@ -30,7 +30,7 @@ repositories {
mavenCentral()
}
dependencies {
compile 'com.maxmind.geoip2:geoip2:4.3.0'
compile 'com.maxmind.geoip2:geoip2:4.3.1'
}
```

Expand Down
46 changes: 26 additions & 20 deletions dev-bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ if [ "$should_continue" != "y" ]; then
exit 1
fi

mvn test

read -r -n 1 -p "Continue given above tests? (y/n) " should_continue

if [ "$should_continue" != "y" ]; then
echo "Aborting"
exit 1
fi

page=.gh-pages/index.md
cat <<EOF > $page
---
Expand All @@ -71,30 +80,29 @@ version: $tag

EOF

mvn versions:set -DnewVersion="$version"

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

cat README.md >> $page

if [ -n "$(git status --porcelain)" ]; then
git diff

read -r -n 1 -p "Commit README.md changes? " should_commit
if [ "$should_commit" != "y" ]; then
echo "Aborting"
exit 1
fi
git add README.md
git commit -m 'update version number in README.md'
git diff

read -r -n 1 -p "Commit changes? " should_commit
if [ "$should_commit" != "y" ]; then
echo "Aborting"
exit 1
fi
git add README.md pom.xml
git commit -m "Preparing for $version"

mvn clean deploy

# could be combined with the primary build
mvn release:clean
mvn release:prepare -DreleaseVersion="$version" -Dtag="$tag"
mvn release:perform
rm -fr ".gh-pages/doc/$tag"
cp -r target/checkout/target/reports/apidocs ".gh-pages/doc/$tag"
ln -Tfs "$tag" .gh-pages/doc/latest
cp -r target/reports/apidocs ".gh-pages/doc/$tag"
rm .gh-pages/doc/latest
ln -fs "$tag" .gh-pages/doc/latest

pushd .gh-pages

Expand All @@ -106,7 +114,6 @@ echo "Release notes for $version:
$notes

"

read -r -n 1 -p "Push to origin? " should_push

if [ "$should_push" != "y" ]; then
Expand All @@ -119,8 +126,7 @@ git push
popd

git push
git push --tags

gh release create --target "$(git branch --show-current)" -t "$version" -n "$notes" "$tag" \
"target/checkout/target/geoip2-$version-with-dependencies.zip" \
"target/checkout/target/geoip2-$version-with-dependencies.zip.asc"
"target/geoip2-$version-with-dependencies.zip" \
"target/geoip2-$version-with-dependencies.zip.asc"
24 changes: 7 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.maxmind.geoip2</groupId>
<artifactId>geoip2</artifactId>
<version>4.3.1-SNAPSHOT</version>
<version>4.3.1</version>
<packaging>jar</packaging>
<name>MaxMind GeoIP2 API</name>
<description>GeoIP2 webservice client and database reader</description>
Expand Down Expand Up @@ -40,7 +40,7 @@
<dependency>
<groupId>com.maxmind.db</groupId>
<artifactId>maxmind-db</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down Expand Up @@ -242,24 +242,14 @@
<version>2.18.0</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-nexus-staging</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
</configuration>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
Loading