Skip to content

Commit 06b95ab

Browse files
committed
Use variables USERNAME and VERSION
1 parent 2b57993 commit 06b95ab

File tree

1 file changed

+37
-15
lines changed

1 file changed

+37
-15
lines changed

libevm/tooling/release/README.md

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,69 @@
11
# Release
22

3-
In the following, we create a release candidate version `v1.13.14-0.2.0.rc.4`.
3+
In the following, we create a release candidate version `v1.13.14-0.2.0.rc.4` and your Github username is `myusername`. We set environment variables accordingly:
4+
5+
```bash
6+
VERSION=v1.13.14-0.2.0.rc.4
7+
USERNAME=myusername
8+
```
49

510
1. Create two branches, usually from the tip of the `main` branch, but the base commit MAY be from anywhere on `main`:
611

712
```bash
813
git fetch origin main:main
914
git checkout main
10-
git checkout -b release/v1.13.14-0.2.0.rc.4
11-
git push -u origin release/v1.13.14-0.2.0.rc.4
12-
git checkout -b myusername/release/v1.13.14-0.2.0.rc.4
15+
git checkout -b "release/$VERSION"
16+
git push -u origin "release/$VERSION"
17+
git checkout -b "$USERNAME/release/$VERSION"
1318
```
1419

15-
The `myusername/release/v1.13.14-0.2.0.rc.4` branch will be used to add "release modifications" and will target the branch `release/v1.13.14-0.2.0.rc.4` in a pull request.
20+
The `$USERNAME/release/$VERSION` branch will be used to add "release modifications" and will target the branch `release/$VERSION` in a pull request.
1621
1. Run the script `./cherrypick.sh` which cherry picks all Geth commits listed in [cherrypicks](cherrypicks). You may have to resolve conflicts. If you encounter a CI error NOT from the `go_test_tooling` job, ideally [amend](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History) the cherry-picked commit(s) responsible for each issue.
1722
1. Modify [params/version.libevm.go](/params/version.libevm.go)
1823
- Change the `LibEVMReleaseType` to the correct release type, for example `ReleaseCandidate`
1924
- If planning a release candidate: set `libEVMReleaseCandidate` to the correct number; in this case `4`
2025
- If needed: change the `LibEVMVersionMajor`, `LibEVMVersionMinor` and `LibEVMVersionPatch` numbers
21-
- Change the `LibEVMVersion` to the correct final version string (`version.libevm_test.go` will ensure that this is correctly formatted)
22-
1. Commit your modifications to [params/version.libevm.go](/params/version.libevm.go) with a commit title `chore: release v1.13.14-0.2.0.rc.4`.
23-
1. Push your modified branch to the remote `git push -u origin myusername/release/v1.13.14-0.2.0.rc.4`
24-
1. Open a pull request from your modified branch `myusername/release/v1.13.14-0.2.0.rc.4` and targeting `release/v1.13.14-0.2.0.rc.4`, for example with `https://github.com/ava-labs/libevm/compare/release/v1.13.14-0.2.0.rc.4...myusername/release/v1.13.14-0.2.0.rc.4?expand=1`. Set the title to "chore: release `v1.13.14-0.2.0.rc.4`"
26+
- Change the `LibEVMVersion` to the correct final version string `$VERSION` (`version.libevm_test.go` will ensure that this is correctly formatted)
27+
1. Commit your modifications to [params/version.libevm.go](/params/version.libevm.go) with a commit title `chore: release v1.13.14-0.2.0.rc.4`:
28+
29+
```bash
30+
git commit -m "chore: release $VERSION"
31+
```
32+
33+
1. Push your modified branch to the remote `git push -u origin $USERNAME/release/$VERSION`
34+
1. Open a pull request from your modified branch `$USERNAME/release/v1.13.14-0.2.0.rc.4` and targeting `release/v1.13.14-0.2.0.rc.4`:
35+
1. You can create the pull request for example using
36+
37+
```bash
38+
open -a "Google Chrome" https://github.com/ava-labs/libevm/compare/release/$VERSION...$USERNAME/release/$VERSION
39+
```
40+
41+
1. Set the title of the pull request to
42+
43+
```txt
44+
chore: release `v1.13.14-0.2.0.rc.4`
45+
```
46+
2547
1. Wait for all the checks to pass on the pull request
2648
1. Fast forward merge your branch in the release branch:
2749

2850
```bash
29-
git checkout release/v1.13.14-0.2.0.rc.4
30-
git merge --ff-only myusername/release/v1.13.14-0.2.0.rc.4
51+
git checkout "release/$VERSION"
52+
git merge --ff-only "$USERNAME/release/$VERSION"
3153
git push
3254
```
3355

3456
This will also close the ongoing pull request.
3557
1. Finally create your tag and push it using the release branch:
3658

3759
```bash
38-
git tag v1.13.14-0.2.0.rc.4
39-
git push origin v1.13.14-0.2.0.rc.4
60+
git tag "$VERSION"
61+
git push origin "$VERSION"
4062
```
4163

4264
1. (optional) you can then cleanup with:
4365

4466
```bash
45-
git branch -D release/v1.13.14-0.2.0.rc.4 myusername/release/v1.13.14-0.2.0.rc.4
46-
git push -d origin myusername/release/v1.13.14-0.2.0.rc.4
67+
git branch -D "release/$VERSION" "$USERNAME/release/$VERSION"
68+
git push -d origin "$USERNAME/release/$VERSION"
4769
```

0 commit comments

Comments
 (0)