Skip to content

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
wants to merge 14 commits into
base: main
Choose a base branch
from
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ with `geth`.

We are immensely grateful for the hard work of the `geth` authors, and hope that our contribution can be of value to others too. Thank you!

To create a release, please refer to [libevm/tooling/release](libevm/tooling/release).

## Go Ethereum

Golang execution layer implementation of the Ethereum protocol.
Expand Down
69 changes: 69 additions & 0 deletions libevm/tooling/release/README.md
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
USERNAME=myusername
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to GH_USER or it conflicts with OSX $USERNAME

```

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 "$USERNAME/release/$VERSION"
```

The `$USERNAME/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)
Copy link
Collaborator

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That way the version string is automatically generated for naming the release branch.

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.

- 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)
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 $USERNAME/release/$VERSION`
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`:
1. You can create the pull request for example using

```bash
open -a "Google Chrome" https://github.com/ava-labs/libevm/compare/release/$VERSION...$USERNAME/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 "$USERNAME/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" "$USERNAME/release/$VERSION"
git push -d origin "$USERNAME/release/$VERSION"
```
Loading