Skip to content

Commit c29879c

Browse files
committed
[bugfix] Correct release process instructions
1 parent 86bf9aa commit c29879c

File tree

1 file changed

+64
-57
lines changed

1 file changed

+64
-57
lines changed

VERSIONING_AND_RELEASING.md

Lines changed: 64 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ We use only two clearly defined forms of `PRERELEASE` label:
5858

5959
A nightly build is similar to a snapshot, except it is automatically built from the latest source code and released once daily. To help distinguish between one day's nightly build and the next's, a 5-component Semantic Versioning version number is used for nightly builds' filenames: "`MAJOR`**.**`MINOR`**.**`PATCH`**-**`PRERELEASE`**+**`BUILD`. We follow Semantic Versioning's definitions for the `BUILD` label scheme:
6060

61-
* `BUILD` is a series of dot separated identifiers, each identifier must use only ASCII alphanumerics and hyphen [0-9A-Za-z-]
62-
and must be empty. Build metadata SHOULD be ignored when determining version precedence.
61+
* `BUILD` is a series of dot separated identifiers, each identifier must use only ASCII alphanumerics and hyphen [0-9A-Za-z-] and must be empty. Build metadata SHOULD be ignored when determining version precedence.
6362

6463
* The presence of `BUILD` indicates that the version is pre-release and not yet considered stable. Product releases do not have `BUILD`.
6564

@@ -78,7 +77,7 @@ It is trivial for a developer to relate a timestamp back to a Git hash (by using
7877
### Where the version number is stored
7978

8079
The version number is stored in the `exist-parent/pom.xml` file, in a single property, `<version>`. The Semantic Versioning number `8.0.0-SNAPSHOT` would be stored as follows:
81-
```
80+
```xml
8281
<version>8.0.0-SNAPSHOT</version>
8382
```
8483

@@ -95,91 +94,95 @@ You will require a system with:
9594
* macOS
9695
* JDK 8
9796
* Maven 3.6.0+
97+
* Python 3 with Pip
9898
* Docker
9999
* GnuPG
100100
* A GPG key (for signing release artifacts)
101101
* A Java KeyStore with key (for signing IzPack Installer)
102102
* A valid Apple Developer Certificate (for signing Mac DMG)
103-
* A GitHub account and username / password or GitHub Personal access tokens (https://github.com/settings/tokens) with permission to publish GitHub releases to the Elemental repository.
103+
* A GitHub account and Personal Access Token (https://github.com/settings/tokens) with permission to publish GitHub releases to the Elemental repository.
104104

105105
1. You will need login credentials for the Elemental organisation on:
106-
1. Sonatype OSS staging for Maven Central - https://oss.sonatype.org/
106+
1. Sonatype Portal for Maven Central - https://central.sonatype.com/publishing/deployments
107107
2. DockerHub - https://cloud.docker.com/orgs/elemental/
108-
109-
Your credentials for these should be stored securely in the `<servers`> section on your machine in your local `~/.m2/settings.xml` file, e.g.:
108+
109+
Your credentials for these should be stored securely in the `<servers>` section on your machine in your local `~/.m2/settings.xml` file, e.g.:
110110
```xml
111111
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
112112
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
113113
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
114114

115115
<servers>
116-
117-
<!-- Sonatype OSS staging for Maven Central -->
116+
117+
<!-- Sonatype Portal for Maven Central -->
118118
<server>
119-
<id>sonatype-nexus-staging</id>
120-
<username>YOUR-USERNAME</username>
121-
<password>YOUR-PASSWORD</password>
119+
<id>central-ossrh-staging</id>
120+
<username>your-username</username>
121+
<password>your-password</password>
122122
</server>
123-
123+
124124
<!-- Elemental DockerHub -->
125125
<server>
126126
<id>docker.io</id>
127-
<username>YOUR-USERNAME</username>
128-
<password>YOUR-PASSWORD</password>
127+
<username>your-username</username>
128+
<password>your-password</password>
129129
</server>
130130

131131
<!-- Elemental GitHub Release -->
132132
<server>
133133
<id>github</id>
134-
<privateKey>[Github Personal access tokens]</privateKey>
134+
<privateKey>your-github-personal-access-token</privateKey>
135135
</server>
136136
</servers>
137137
</settings>
138138
```
139139

140140
2. You will need your GPG Key, Java KeyStore, and Apple Notarization API credentials for signing the release artifacts in the `<activeProfiles`> section on your machine in your local `~/.m2/settings.xml` file, e.g.:
141141
```xml
142-
<profiles>
143-
144-
<profile>
145-
<id>elemental-release-signing</id>
146-
<properties>
147-
<elemental.release.key>ABC1234</elemental.release.key>
148-
<elemental.release.public-keyfile>${user.home}/.gnupg/pubring.gpg</elemental.release.public-keyfile>
149-
<elemental.release.private-keyfile>${user.home}/.gnupg/secring.gpg</elemental.release.private-keyfile>
150-
<elemental.release.key.passphrase>your-password</elemental.release.key.passphrase>
151-
152-
<elemental.release.keystore>${user.home}/your.store</elemental.release.keystore>
153-
<elemental.release.keystore.pass>your-keystore-password</elemental.release.keystore.pass>
154-
<elemental.release.keystore.key.alias>your-alias</elemental.release.keystore.key.alias>
155-
<elemental.release.keystore.key.pass>your-key-password</elemental.release.keystore.key.pass>
156-
157-
<elemental.release.notarize.username>[email protected]</elemental.release.notarize.username>
158-
<elemental.release.notarize.password>your-apple-notarize-api-password</elemental.release.notarize.password>
159-
</properties>
160-
</profile>
161-
162-
</profiles>
163-
164-
165-
<activeProfiles>
166-
142+
<profiles>
143+
144+
<profile>
145+
<id>elemental-release-signing</id>
146+
<properties>
147+
<elemental.release.key>ABC1234</elemental.release.key>
148+
<elemental.release.public-keyfile>${user.home}/.gnupg/pubring.gpg</elemental.release.public-keyfile>
149+
<elemental.release.private-keyfile>${user.home}/.gnupg/secring.gpg</elemental.release.private-keyfile>
150+
<elemental.release.key.passphrase>your-password</elemental.release.key.passphrase>
151+
152+
<elemental.release.keystore>${user.home}/your.store</elemental.release.keystore>
153+
<elemental.release.keystore.pass>your-keystore-password</elemental.release.keystore.pass>
154+
<elemental.release.keystore.key.alias>your-alias</elemental.release.keystore.key.alias>
155+
<elemental.release.keystore.key.pass>your-key-password</elemental.release.keystore.key.pass>
156+
157+
<elemental.release.notarize.apple-id>[email protected]</elemental.release.notarize.apple-id>
158+
<elemental.release.notarize.team-id>your-apple-developer-team-id</elemental.release.notarize.team-id>
159+
<elemental.release.notarize.password>your-apple-notarize-api-password</elemental.release.notarize.password>
160+
161+
<mac.codesign.identity>signature-of-your-apple-developer-certificate</mac.codesign.identity>
162+
</properties>
163+
</profile>
164+
165+
</profiles>
166+
167+
168+
<activeProfiles>
169+
167170
<activeProfile>elemental-release-signing</activeProfile>
168-
169-
</activeProfiles>
171+
172+
</activeProfiles>
170173
```
171174

172175
3. Merge any outstanding PRs that have been reviewed and accepted for the milestone (e.g. `elemental-6.5.0`).
173176

174177
4. Make sure that you have the HEAD of `origin/main` (or `upstream` if you are on a fork).
175178

176-
5. Prepare the release, if you wish you can do a dry-run first by specifiying `-DdryRun=true`:
177-
```
179+
5. Prepare the release, if you wish you can do a dry-run first by specifying `-DdryRun=true`:
180+
```bash
178181
$ mvn -Ddocker=true -Dmac-signing=true -P installer -Dizpack-signing=true -Darguments="-Ddocker=true -Dmac-signing=true -P installer -Dizpack-signing=true" release:prepare
179182
```
180-
183+
181184
Maven will start the release process and prompt you for any information that it requires, for example:
182-
185+
183186
```
184187
[INFO] --- maven-release-plugin:2.1:prepare (default-cli) @ elemental ---
185188
[INFO] Verifying that there are no local modifications...
@@ -192,13 +195,17 @@ You will require a system with:
192195
What is the new development version for "Elemental"? (xyz.elemental:elemental) 6.6.0-SNAPSHOT: :
193196
```
194197

195-
6. Once the prepare process completes you can perform the release. This will upload Maven Artifacts to Maven
196-
Central (staging), Docker images to Docker Hub, and Elemental distributions and installer to GitHub releases:
197-
```
198+
6. Once the prepare process completes you can perform the release. This will upload Maven Artifacts to Maven Central (staging), Docker images to Docker Hub, and Elemental distributions and installer to GitHub releases:
199+
```bash
198200
$ mvn -Ddocker=true -Dmac-signing=true -P installer -Dizpack-signing=true -Djarsigner.skip=false -Darguments="-Ddocker=true -Dmac-signing=true -P installer -Dizpack-signing=true -Djarsigner.skip=false" release:perform
199201
```
200202

201-
7. Update the stable branch (`gold`) of Elemental to reflect the latest release:
203+
7. You now need to request the artifacts to be moved from the Portal OSSRH Staging API to the Maven Central staging area:
204+
```bash
205+
$ curl -vv -X POST -H "Authorization: Bearer your-bearer-token-for-maven-central" https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/xyz.elemental
206+
```
207+
208+
8. Update the stable branch (`gold`) of Elemental to reflect the latest release:
202209
```bash
203210
$ git push origin elemental-6.5.0:gold
204211
```
@@ -208,7 +215,7 @@ Central (staging), Docker images to Docker Hub, and Elemental distributions and
208215

209216
2. Check that the new versions are visible on [DockerHub](https://hub.docker.com/r/evolvedbinary/elemental).
210217

211-
3. Login to https://oss.sonatype.org and release the Maven artifacts to Maven central as described [here](https://central.sonatype.org/pages/releasing-the-deployment.html).
218+
3. Login to https://central.sonatype.com/publishing/deployments and release the Maven artifacts to Maven central as described [here](https://central.sonatype.org/publish/publish-portal-guide/).
212219

213220
4. Update the Mac HomeBrew for Elemental, see: [Releasing to Homebrew](https://github.com/evolvedbinary/elemental/blob/main/VERSIONING_AND_RELEASING.md#releasing-to-homebrew).
214221

@@ -224,18 +231,18 @@ Central (staging), Docker images to Docker Hub, and Elemental distributions and
224231

225232
10. Update the Wikipedia page with the new version details - [https://en.wikipedia.org/wiki/Elemental](https://en.wikipedia.org/wiki/Elemental).
226233

227-
1Go to GitHub and move all issues and PRs which are still open for the release milestone to the next release milestone. Close the release milestone.
234+
11. Go to GitHub and move all issues and PRs which are still open for the release milestone to the next release milestone. Close the release milestone.
228235

229236

230237
### Releasing to Homebrew
231238
[Homebrew](http://brew.sh) is a popular command-line package manager for macOS. Once Homebrew is installed, applications like Elemental can be installed via a simple command. Elemental's presence on Homebrew is found in the Caskroom project, as a "cask", at [https://github.com/caskroom/homebrew-cask/blob/master/Casks/elemental.rb](https://github.com/caskroom/homebrew-cask/blob/master/Casks/elemental.rb).
232239

233240
**Terminology:** "Homebrew Cask" is the segment of Homebrew where pre-built binaries and GUI applications go, whereas the original "Homebrew" project is reserved for command-line utilities that can be built from source. Because the macOS version of Elemental is released as an app bundle with GUI components, it is handled as a Homebrew Cask.
234241

235-
When there is a new release, registering the new release with Homebrew can be easily accomplished using Homebrew's `brew bump-cask-pr` command. Full directions for this utility as well as procedures for more complex PRs can be found on [the Homebrew Cask CONTRIBUTING page](https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md), but, a simple version bump is a one-line command. For example, to update Homebrew's version of Elemental to 6.4.0, use this command:
242+
When there is a new release, registering the new release with Homebrew can be easily accomplished using Homebrew's `brew bump-cask-pr` command. Full directions for this utility as well as procedures for more complex PRs can be found on [the Homebrew Cask CONTRIBUTING page](https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md), but, a simple version bump is a one-line command. For example, to update Homebrew's version of Elemental to 6.5.0, use this command:
236243

237-
```
238-
brew bump-cask-pr --version 6.4.0 elemental
244+
```bash
245+
brew bump-cask-pr --version 6.5.0 elemental
239246
```
240247

241-
This command will cause your local Homebrew installation to download the new version of Elemental, calculate the installer's new SHA-256 fingerprint value, and construct a pull request under your GitHub account, like [this one](https://github.com/Homebrew/homebrew-cask/pull/107778). Once the pull request is submitted, continuous integration tests will run, and a member of the Homebrew community will review the PR. At times there is a backlog on the CI servers, but once tests pass, the community review is typically completed in a matter of hours.
248+
This command will cause your local Homebrew installation to download the new version of Elemental, calculate the installer's new SHA-256 fingerprint value, and construct a pull request under your GitHub account, like [this one](https://github.com/Homebrew/homebrew-cask/pull/210264). Once the pull request is submitted, continuous integration tests will run, and a member of the Homebrew community will review the PR. At times there is a backlog on the CI servers, but once tests pass, the community review is typically completed in a matter of hours.

0 commit comments

Comments
 (0)