From d87b82add1839143ab7754771e5f2aa781671871 Mon Sep 17 00:00:00 2001 From: Mantre Date: Mon, 30 Oct 2023 00:43:37 +0800 Subject: [PATCH] chore: bumping version to 0.17.0 (#790) --- docs/patching.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++ docs/releasing.md | 9 +++++---- version/version.go | 4 ++-- 3 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 docs/patching.md diff --git a/docs/patching.md b/docs/patching.md new file mode 100644 index 000000000..1ab37d0bc --- /dev/null +++ b/docs/patching.md @@ -0,0 +1,49 @@ +## Patching Process + +To patch a released version, start by creating a dedicated branch for that version, proceed with the required updates, and eventually release the patched branch. + +1. **Creating Environment Variables** + +Let's create environment variables for the patch version. For the rest of this document, we will use these environment variables in the commands. + +```bash +PRV_VER="0.16.0" +CUR_VER="0.16.1" +NEXT_VER="0.16.2" +TAG_NAME="v${CUR_VER}" +TAG_MSG="Version ${CUR_VER}" +BASE_BRANCH="0.16.x" +BASE_VER="0.16.0" +``` + +For the rest of this document, we will use these environment variables in commands. +Keep your terminal open. + +2. **Creating a new branch** + +If this is the first patch for the specific major version, we need to first create a branch for this tag: + +```bash +git checkout -b ${BASE_BRANCH} v${BASE_VER} +git branch --set-upstream-to=origin/${BASE_BRANCH} +``` + +and update the patch version inside the [version.go](../version/version.go) file. + +Otherwise, switch to the patch branch: + +```bash +git checkout ${BASE_BRANCH} +``` + +3. **Updating the branch** + +Apply the fixes to the branch. You can use [cherry-pick](https://www.atlassian.com/git/tutorials/cherry-pick) to pick some commits from the main branch and apply them to the patch branch: + +```bash +git cherry-pick +``` + +4. **Follow the [Releasing](./releasing.md) Document** + +Please refer to the [Releasing](./releasing.md) document and follow the steps outlined from Step 4 until the end to complete the patching process. diff --git a/docs/releasing.md b/docs/releasing.md index 1f5ee1cef..4d6468d10 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -31,9 +31,9 @@ Let's create environment variables for the release version. For the rest of this document, we will use these environment variables in the commands. ```bash -PRV_VER="0.15.0" -CUR_VER="0.16.0" -NEXT_VER="0.17.0" +PRV_VER="0.16.0" +CUR_VER="0.17.0" +NEXT_VER="0.18.0" TAG_NAME="v${CUR_VER}" TAG_MSG="Version ${CUR_VER}" BASE_BRANCH="main" @@ -106,7 +106,8 @@ Pushing the tag will automatically create a release tag and build the binaries. 9. **Bumping version** -Update the version inside the [version.go](../version/version.go) and [patching](./patching.md) docuemnts. +Update the version inside the [version.go](../version/version.go) and add `beta` to the `meta` field. +Update [patching](./patching.md) docuemnt. If this is a majore release, update the version inside this document in step 3. Create a new PR against base branch: diff --git a/version/version.go b/version/version.go index 711fd601d..6f347519c 100644 --- a/version/version.go +++ b/version/version.go @@ -7,9 +7,9 @@ import ( // These constants follow the semantic versioning 2.0.0 spec (http://semver.org/) const ( major uint = 0 - minor uint = 16 + minor uint = 17 patch uint = 0 - meta string = "" + meta string = "beta" ) var build string