11# Preparing your environment for a release
2- - Ensure you have access to publish to the repository on
3- [ Sonatype] ( https://oss.sonatype.org ) .
4- - See the section about Sonatype access.
5- - You need a GPG secret key. You need to publish it as well.
6- - See the section about setting up GPG.
7- - Ensure the SSH key you use on GitHub.com is available.
8- - e.g., ` ~/.ssh/id_rsa ` .
9- - Ensure an appropriate ` ~/.gitconfig ` is set up.
10- - The release process generates commits.
11- - Ensure you have the necessary dependencies available:
12- - e.g., ` apt-get install maven openjdk-8-jdk git-core gpg `
13- - Ensure [ hub] ( https://github.com/github.com/hub ) is set up and in your
14- ` PATH ` .
15- - An easy way to do this is get a release tarball and run ` ./install ` .
2+ - Ensure you have access to publish to the repository on
3+ [ Sonatype] ( https://oss.sonatype.org ) .
4+ - See the section about Sonatype access.
5+ - You need a GPG secret key. You need to publish it as well.
6+ - See the section about setting up GPG.
7+ - Ensure the SSH key you use on GitHub.com is available.
8+ - e.g., ` ~/.ssh/id_rsa ` .
9+ - Ensure an appropriate ` ~/.gitconfig ` is set up.
10+ - The release process generates commits.
11+ - Ensure you have the necessary dependencies available:
12+ - e.g., ` apt-get install maven openjdk-8-jdk git-core gpg `
13+ - Ensure [ hub] ( https://github.com/github.com/hub ) is set up and in your
14+ ` PATH ` .
15+ - An easy way to do this is get a release tarball and run ` ./install ` .
1616
1717
1818## Setting up Sonatype access
@@ -51,9 +51,9 @@ Put this information into `~/.m2/settings.xml` (Maven settings). Your
5151
5252Some links about Sonatype:
5353
54- * http://central.sonatype.org/pages/ossrh-guide.html
55- * http://central.sonatype.org/pages/releasing-the-deployment.html
56- * http://central.sonatype.org/pages/apache-maven.html
54+ * http://central.sonatype.org/pages/ossrh-guide.html
55+ * http://central.sonatype.org/pages/releasing-the-deployment.html
56+ * http://central.sonatype.org/pages/apache-maven.html
5757
5858
5959## Setting up GPG
@@ -94,47 +94,57 @@ Add this to ~/.gnupg/gpg-agent.conf:
9494# Releasing
9595
9696## Steps
97- - Ensure you can run ` mvn test ` and ` mvn package ` successfully. Run
98- ` mvn clean ` after.
99- - Ensure you have a clean checkout of ` master ` and that the subdirectory
100- ` .gh-pages ` either does not exist or is a clean checkout.
101- - We'll be generating commits.
102- - Set a version and a date in ` CHANGELOG.md ` and commit that.
103- - It gets used in the release process.
104- - Run ` ./dev-bin/release.sh `
105- - This will prompt you several times. Generally you need to say ` y ` or
106- ` n ` .
107- - You'll be prompted for your ssh key password, GPG key password, and
108- GitHub.com username and password several times depending on your
109- workspace.
110- - You may be prompted about "what is the next development version?". Hit
111- enter to use the default which should be fine.
112- - You may be prompted about "The following dependencies in Dependencies
113- have newer versions". See the section about updating dependencies if so.
114- - If you get HTTP 401 errors from Sonatype, you probably don't have a
115- correct ` settings.xml ` . Refer to the Sonatype section.
116- - If this happened, there are most likely pushed commits on GitHub.com.
117- You can potentially rebase and drop the commits and force push and
118- start over (you might want to talk about this before doing it). Note
119- you'll need to delete the release tag too:
120- ` git push origin :refs/tags/vx.y.z && git tag -d vx.y.z ` .
121- - If you get to this point, then a release is on GitHub.com and in the
122- staging repository on [ Sonatype] ( https://oss.sonatype.org ) .
123- - Go to [ Sonatype] ( https://oss.sonatype.org ) and log in.
124- - On the left hand side, choose Staging repositories.
125- - At the bottom you should see your staged release. It will be something
126- like "commmaxmind-xxxx". Click on that.
127- - Near the top of the page there is a "Close" button. Click it.
128- - You have to close a staging release before you can release it.
129- - Wait around 30 seconds. Click Refresh near the top of the page while
130- you wait. Eventually you should see the "Activity" line in the info
131- about your repository say something like it is complete.
132- - Click Release near the top.
133- - You're done!
134- - If you want to check things over, look at the commits on GitHub.com,
135- including to the ` gh-pages ` branch and release tags, and do an artifact
136- search on [ Sonatype] ( https://oss.sonatype.org ) to see the version is as
137- you expect.
97+ - Ensure you can run ` mvn test ` and ` mvn package ` successfully. Run
98+ ` mvn clean ` after.
99+ - Ensure you have a clean checkout of ` master ` and that the subdirectory
100+ ` .gh-pages ` either does not exist or is a clean checkout.
101+ - We'll be generating commits.
102+ - Review open issues and PRs to see if any can easily be fixed, closed, or
103+ merged.
104+ - Review ` CHANGELOG.md ` for completeness and correctness.
105+ - Set a version and a date in ` CHANGELOG.md ` and commit that.
106+ - It gets used in the release process.
107+ - Bump copyright year in ` README.md ` if appropriate.
108+ - You don't need to update the version. ` ./dev-bin/release.sh ` does this.
109+ - Run ` ./dev-bin/release.sh `
110+ - This will package the release, update the gh-pages branch, bump the
111+ version to the next development release, upload the release to GitHub
112+ and tag it, and upload to Sonatype.
113+ - This will prompt you several times. Generally you need to say ` y ` or ` n ` .
114+ - You'll be prompted for your ssh key password, GPG key password, and
115+ GitHub.com username and password several times depending on your
116+ workspace.
117+ - You may be prompted about "what is the next development version?". Hit
118+ enter to use the default which should be fine.
119+ - You may be prompted about "The following dependencies in Dependencies
120+ have newer versions". See the section about updating dependencies if so.
121+ - If you get HTTP 401 errors from Sonatype, you probably don't have a
122+ correct ` settings.xml ` . Refer to the Sonatype section.
123+ - If this happened, there are most likely pushed commits on GitHub.com.
124+ You can potentially rebase and drop the commits and force push and
125+ start over (you might want to talk about this before doing it). Note
126+ you'll need to delete the release tag too:
127+ ` git push origin :refs/tags/vx.y.z && git tag -d vx.y.z ` .
128+ - If you get to this point, then a release is on GitHub.com and in the
129+ staging repository on [ Sonatype] ( https://oss.sonatype.org ) .
130+ - Go to [ Sonatype] ( https://oss.sonatype.org ) and log in.
131+ - On the left hand side, choose Staging repositories.
132+ - At the bottom you should see your staged release. It will be something
133+ like "commmaxmind-xxxx". Click on that.
134+ - Near the top of the page there is a "Close" button. Click it.
135+ - You have to close a staging release before you can release it.
136+ - Wait around 30 seconds. Click Refresh near the top of the page while
137+ you wait. Eventually you should see the "Activity" line in the info
138+ about your repository say something like it is complete.
139+ - Click Release near the top.
140+ - This also takes a moment (you will see "operation in progress" again).
141+ Refresh as usual. When it's done, you won't see the "commmaxmind-xxxx"
142+ entry in the staging repositories any more.
143+ - You're done!
144+ - If you want to check things over, look at the commits on GitHub.com,
145+ including to the ` gh-pages ` branch and release tags, and do an artifact
146+ search on [ Sonatype] ( https://oss.sonatype.org ) to see the version is as
147+ you expect.
138148
139149
140150## Updating dependencies
@@ -144,11 +154,11 @@ process (say `n` or ctrl-c out).
144154
145155To update them:
146156
147- - Make a branch
148- - Update ` pom.xml ` to have the new versions you want
149- - Run ` mvn test ` and fix any errors
150- - Push and ensure Travis completes successfully
151- - Merge
157+ - Make a branch
158+ - Update ` pom.xml ` to have the new versions you want
159+ - Run ` mvn test ` and fix any errors
160+ - Push and ensure Travis completes successfully
161+ - Merge
152162
153163If you did this in the middle of releasing, you'll have to start that
154164process over.
0 commit comments