|
| 1 | +# Helidon CLI Release |
| 2 | + |
| 3 | +The CLI is currently released to `HomeBrew` and `SDKMan!`. This document explain the steps to release a new version. |
| 4 | + |
| 5 | +## HomeBrew |
| 6 | + |
| 7 | +HomeBrew Core has a Helidon Formula to allow every user to easily install the CLI. To release a new version, |
| 8 | +update the `url` configuration key to the new version. The Formula has some basic testing to make sure the CLI can generate |
| 9 | +project. Nevertheless, for more test coverage, it is possible to test the updated Formula locally. Update the formula in |
| 10 | +your local Homebrew (`homebrew/Library/Taps/homebrew/homebrew-core/h/helidon.rb`) and use this command: |
| 11 | + |
| 12 | +```shell |
| 13 | +export HOMEBREW_NO_INSTALL_FROM_API=1 |
| 14 | +brew install --build-from-source --verbose helidon |
| 15 | +``` |
| 16 | + |
| 17 | +Formula: https://github.com/Homebrew/homebrew-core/blame/master/Formula/h/helidon.rb |
| 18 | + |
| 19 | +## SDKMan! |
| 20 | + |
| 21 | +Use SDKMan REST endpoint to publish the new released binaries with our credentials available in the Vault. |
| 22 | + |
| 23 | +1. Release a new candidate |
| 24 | + |
| 25 | +```shell |
| 26 | +curl -X POST \ |
| 27 | +-H "Consumer-Key: CONSUMER_KEY" \ |
| 28 | +-H "Consumer-Token: CONSUMER_TOKEN" \ |
| 29 | +-H "Content-Type: application/json" \ |
| 30 | +-H "Accept: application/json" \ |
| 31 | +-d '{"candidate": "helidon", "version": "${version}", "url": "https://github.com/helidon-io/helidon-build-tools/releases/download/${version}/helidon-cli.zip"}' \ |
| 32 | +https://vendors.sdkman.io/release |
| 33 | +``` |
| 34 | +The release endpoint support `POST` and `DELETE` HTTP methods. Releasing a new candidate does not make it the default |
| 35 | +version. It is considered a minor release, setting the new candidate as a default version is major release. |
| 36 | + |
| 37 | +2. Set existing Version as Default for Candidate (Optional) |
| 38 | + |
| 39 | +Use the following command to set a version as default. |
| 40 | + |
| 41 | +```shell |
| 42 | +curl -X PUT \ |
| 43 | +-H "Consumer-Key: CONSUMER_KEY" \ |
| 44 | +-H "Consumer-Token: CONSUMER_TOKEN" \ |
| 45 | +-H "Content-Type: application/json" \ |
| 46 | +-H "Accept: application/json" \ |
| 47 | +-d '{"candidate": "helidon", "version": "${version}"}' \ |
| 48 | +https://vendors.sdkman.io/default |
| 49 | +``` |
| 50 | + |
| 51 | +3. Broadcast a Structured Message (Optional) |
| 52 | + |
| 53 | +Announce the new release through SDKMan social media (X feed) and broadcast channel of SDKMAN! CLI. |
| 54 | + |
| 55 | +```shell |
| 56 | +curl -X POST \ |
| 57 | +-H "Consumer-Key: CONSUMER_KEY" \ |
| 58 | +-H "Consumer-Token: CONSUMER_TOKEN" \ |
| 59 | +-H "Content-Type: application/json" \ |
| 60 | +-H "Accept: application/json" \ |
| 61 | +-d '{"candidate": "helidon", "version": "${version}", "url": "https://helidon.io"}' \ |
| 62 | +https://vendors.sdkman.io/announce/struct |
| 63 | +``` |
| 64 | +`url`: display the url where user can find the binaries (or any other useful information). |
| 65 | +The broadcast message looks like this `helidon ${version} available for download. https://helidon.io` |
| 66 | + |
0 commit comments