|
1 | 1 | # Release |
2 | 2 |
|
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 | +``` |
4 | 9 |
|
5 | 10 | 1. Create two branches, usually from the tip of the `main` branch, but the base commit MAY be from anywhere on `main`: |
6 | 11 |
|
7 | 12 | ```bash |
8 | 13 | git fetch origin main:main |
9 | 14 | 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" |
13 | 18 | ``` |
14 | 19 |
|
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. |
16 | 21 | 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. |
17 | 22 | 1. Modify [params/version.libevm.go](/params/version.libevm.go) |
18 | 23 | - Change the `LibEVMReleaseType` to the correct release type, for example `ReleaseCandidate` |
19 | 24 | - If planning a release candidate: set `libEVMReleaseCandidate` to the correct number; in this case `4` |
20 | 25 | - 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 | + |
25 | 47 | 1. Wait for all the checks to pass on the pull request |
26 | 48 | 1. Fast forward merge your branch in the release branch: |
27 | 49 |
|
28 | 50 | ```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" |
31 | 53 | git push |
32 | 54 | ``` |
33 | 55 |
|
34 | 56 | This will also close the ongoing pull request. |
35 | 57 | 1. Finally create your tag and push it using the release branch: |
36 | 58 |
|
37 | 59 | ```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" |
40 | 62 | ``` |
41 | 63 |
|
42 | 64 | 1. (optional) you can then cleanup with: |
43 | 65 |
|
44 | 66 | ```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" |
47 | 69 | ``` |
0 commit comments