Skip to content

Commit

Permalink
Merge pull request #98 from Kuadrant/release-doc
Browse files Browse the repository at this point in the history
doc: release
  • Loading branch information
eguzki authored Jul 18, 2024
2 parents db1726a + b00f255 commit 2bc1faf
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ This will compile `kuadrantctl` and install it in the `bin` directory at root of
kuadrantctl [command] [subcommand] [flags]
```


### Commands Overview

| Command | Description |
Expand Down
57 changes: 57 additions & 0 deletions doc/RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## Release

The release process follows a streamlined approach, no release branches involved.
New releases can be major, minor or patch based releases, but always incrementing digits
regarding the latest release version.

### New Major.Minor.Patch version

1. Create a new minor release branch from the HEAD of main:
```sh
git checkout -b release-vX.Y.Z
```
2. Update version (prefixed with **"v"**):
```sh
make prepare-release VERSION=vX.Y.Z
```
3. Verify local changes:
```sh
make install
bin/kuadrantctl version
```
The output should be the new version, for example :
```
kuadrantctl v0.3.0 (ff779a1-dirty)
```
4. Commit and push:
```sh
git add .
git commit -m "prepare-release: release-vX.Y.Z"
git push origin release-vX.Y.Z
```
5. Create git tag:
```sh
git tag -s -m vX.Y.Z vX.Y.Z
git push origin vX.Y.Z
```
6. In Github, [create release](https://github.com/Kuadrant/kuadrantctl/releases/new).

* Pick recently pushed git tag
* Automatically generate release notes from previous released tag
* Set as the latest release

7. Verify that the build [Release workflow](https://github.com/Kuadrant/kuadrantctl/actions/workflows/release.yaml) is triggered and completes for the new tag

### Verify new release is available

1. Download the latest binary for your platform from the [`kuadrantctl` Latest Releases](https://github.com/Kuadrant/kuadrantctl/releases/latest) page.
2. Unpack the binary.
3. Move it to a directory in your `$PATH` so that it can be executed from anywhere.
4. Check the version:
```sh
kuadrantctl version
```
The output should be the new version, for example :
```
kuadrantctl v0.3.0 (eec318b2e11e7ea5add5e550ff872bde64555d8f)
```
7 changes: 7 additions & 0 deletions make/release.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
##@ Release tasks

prepare-release:
ifndef VERSION
$(error VERSION is undefined)
endif
sed -i 's/Version = ".*"/Version = "$(VERSION)"/' version/version.go

0 comments on commit 2bc1faf

Please sign in to comment.