-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,27 +8,57 @@ proceed with the required updates, and eventually release the patched branch. | |
Before proceeding with the patching process, | ||
ensure that your `origin` remote is set to `[email protected]:pactus-project/pactus.git` and not your local fork. | ||
|
||
## 2. Create a Patch Branch | ||
## 2. Set Environment Variables | ||
|
||
Create environment variables for the patch version, which will be used in subsequent commands throughout this document. | ||
Keep your terminal open for further steps. | ||
|
||
```bash | ||
PRV_VER="1.2.0" | ||
CUR_VER="1.2.1" | ||
NEXT_VER="1.2.2" | ||
BASE_BRANCH="1.2.x" | ||
TAG_NAME="v${CUR_VER}" | ||
TAG_MSG="Version ${CUR_VER}" | ||
``` | ||
|
||
## 3. Patch Branch | ||
|
||
### Create the Patch branch | ||
|
||
If this is the first patch for a specific major version, you'll need to create a branch for this tag. | ||
Replace `<minor>` with the appropriate minor version number: | ||
|
||
```bash | ||
git checkout -b 1.<minor>.x v1.<minor>.0 | ||
git checkout -b ${BASE_BRANCH} v${PRV_VER} | ||
git log | ||
git push --set-upstream origin 1.<minor>.x | ||
git push --set-upstream origin ${BASE_BRANCH} | ||
``` | ||
|
||
Don't forget to update the patch version inside the [version.go](../version/version.go) file. | ||
Update the patch version inside the [version.go](../version/version.go), | ||
clear Alias and set "beta" to the Meta. | ||
|
||
Create a new PR against the patch branch: | ||
|
||
```bash | ||
git checkout -b bumping_${CUR_VER} | ||
git commit -a -m "chore: bumping version to ${CUR_VER}" | ||
git push origin HEAD | ||
gh pr create --title "chore: bumping version to ${CUR_VER}" --body "Bumping version to ${CUR_VER}" --base ${BASE_BRANCH} | ||
``` | ||
|
||
As an example check this [Pull Request](https://github.com/pactus-project/pactus/pull/1367). | ||
Wait for the PR to be approved and merged into the patch branch. | ||
|
||
### Switch the Patch branch | ||
|
||
If you're not creating a new patch branch, switch to the existing patch branch: | ||
|
||
```bash | ||
git checkout 1.<minor>.x | ||
git checkout ${BASE_BRANCH} | ||
git pull | ||
``` | ||
|
||
## 3. Apply Fixes | ||
## 4. Apply Fixes | ||
|
||
Now, apply the necessary fixes to the patch branch. | ||
You can use [cherry-pick](https://www.atlassian.com/git/tutorials/cherry-pick) to | ||
|
@@ -39,21 +69,6 @@ git cherry-pick <commit-id> | |
git push | ||
``` | ||
|
||
## 4. Set Environment Variables | ||
|
||
Reopen this document within the branch version and | ||
create environment variables for the release version, which will be used in subsequent commands throughout this document. | ||
Keep your terminal open for further steps. | ||
|
||
```bash | ||
PRV_VER="1.2.0" | ||
CUR_VER="1.2.1" | ||
NEXT_VER="1.2.2" | ||
BASE_BRANCH="1.2.x" | ||
TAG_NAME="v${CUR_VER}" | ||
TAG_MSG="Version ${CUR_VER}" | ||
``` | ||
|
||
## 5. Follow the Releasing Document | ||
|
||
Refer to the [Releasing](./releasing.md) document and follow the steps outlined from Step 5 until the end. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters