forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 3
docs(libevm/tooling/release): add readme #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
qdm12
wants to merge
16
commits into
main
Choose a base branch
from
qdm12/libevm/tooling/release/readme
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a080b83
docs(libevm/tooling/release): add readme
qdm12 92023af
Refer tooling/release in main readme
qdm12 c4b262f
Add more steps
qdm12 c42928b
Fix tag push git command
qdm12 b0ca643
Add details to step 1.
qdm12 2a0aa1d
Simplify step 2 to be a single line
qdm12 3b326a3
Change tag to version in introduction
qdm12 8f400ec
Simplify README.md reference to release creation document
qdm12 ab8fbb1
Precise unit test checks the version string is correct
qdm12 8285be7
Move remote push of branch from step 1 to step 5
qdm12 de4b8b2
typo fix
qdm12 f28b610
Move LibEVMVersion setting as last bullet point
qdm12 2b57993
Add you should amend commits responsible for CI errors
qdm12 06b95ab
Use variables USERNAME and VERSION
qdm12 6cbf989
Add reference to LibEVMVersion godoc comment
qdm12 b68391c
Rename USERNAME to GH_USER variable
qdm12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Release | ||
|
||
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: | ||
|
||
```bash | ||
VERSION=v1.13.14-0.2.0.rc.4 | ||
GH_USER=myusername | ||
``` | ||
|
||
1. Create two branches, usually from the tip of the `main` branch, but the base commit MAY be from anywhere on `main`: | ||
|
||
```bash | ||
git fetch origin main:main | ||
git checkout main | ||
git checkout -b "release/$VERSION" | ||
git push -u origin "release/$VERSION" | ||
git checkout -b "$GH_USER/release/$VERSION" | ||
``` | ||
|
||
The `$GH_USER/release/$VERSION` branch will be used to add "release modifications" and will target the branch `release/$VERSION` in a pull request. | ||
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. | ||
1. Modify [params/version.libevm.go](/params/version.libevm.go) | ||
- Change the `LibEVMReleaseType` to the correct release type, for example `ReleaseCandidate` | ||
- If planning a release candidate: set `libEVMReleaseCandidate` to the correct number; in this case `4` | ||
- If needed: change the `LibEVMVersionMajor`, `LibEVMVersionMinor` and `LibEVMVersionPatch` numbers | ||
- Change the `LibEVMVersion` to the correct final version string `$VERSION` (`version.libevm_test.go` will ensure that this is correctly formatted). See the [`LibEVMVersion` comment](https://pkg.go.dev/github.com/ava-labs/libevm/params#LibEVMVersion) for more details regarding its semantics. | ||
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`: | ||
|
||
```bash | ||
git commit -m "chore: release $VERSION" | ||
``` | ||
|
||
1. Push your modified branch to the remote `git push -u origin $GH_USER/release/$VERSION` | ||
1. Open a pull request from your modified branch `$GH_USER/release/v1.13.14-0.2.0.rc.4` and targeting `release/v1.13.14-0.2.0.rc.4`: | ||
1. You can create the pull request for example using | ||
|
||
```bash | ||
open -a "Google Chrome" https://github.com/ava-labs/libevm/compare/release/$VERSION...$GH_USER/release/$VERSION | ||
``` | ||
|
||
1. Set the title of the pull request to | ||
|
||
```txt | ||
chore: release `v1.13.14-0.2.0.rc.4` | ||
``` | ||
|
||
1. Wait for all the checks to pass on the pull request | ||
1. Fast forward merge your branch in the release branch: | ||
|
||
```bash | ||
git checkout "release/$VERSION" | ||
git merge --ff-only "$GH_USER/release/$VERSION" | ||
git push | ||
``` | ||
|
||
This will also close the ongoing pull request. | ||
1. Finally create your tag and push it using the release branch: | ||
|
||
```bash | ||
git tag "$VERSION" | ||
git push origin "$VERSION" | ||
``` | ||
|
||
1. (optional) you can then cleanup with: | ||
|
||
```bash | ||
git branch -D "release/$VERSION" "$GH_USER/release/$VERSION" | ||
git push -d origin "$GH_USER/release/$VERSION" | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's useful to have this as the first step but NOT have anything committed. That way the version string is automatically generated for naming the release branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Through a test right?
I think it's best to keep it as it is, and have the CI check on the version string humanly typed, to avoid any bad copy-paste surprises.