This repository has been archived by the owner on May 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Paul Pietkiewicz <[email protected]>
- Loading branch information
Showing
2 changed files
with
144 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,143 @@ | ||
# Release Process | ||
|
||
|
||
## Prerequisites: | ||
- Prepare release notes | ||
|
||
|
||
## Weekly chores | ||
### Enarx dependency update | ||
- Update local code | ||
```bash | ||
git fetch --all | ||
git checkout main | ||
git pull --ff-only | ||
``` | ||
- Checkout chore branch | ||
```bash | ||
git checkout -b update-prerequisites | ||
``` | ||
- Check to see `Cargo.toml` is refering to the latest updated prerequisite crates | ||
- Run cargo-update on all individual sub-crates in updated packages are referenced | ||
```bash | ||
for d in internal/*/ ; do (cd "$d" && cargo update); done | ||
``` | ||
- Git commit sub-crate update | ||
```bash | ||
git commit -asm 'Updated Enarx sub-crate dependencies' | ||
``` | ||
- Run cargo update on `enarx` | ||
```bash | ||
cargo update | ||
``` | ||
- Git commit sub-crate update | ||
```bash | ||
git commit -asm 'Updated Enarx dependencies' | ||
``` | ||
- Run build and tests | ||
```bash | ||
cargo clean | ||
cargo build | ||
cargo tests | ||
``` | ||
- Create PR | ||
```bash | ||
git push origin update-prerequisites | ||
``` | ||
|
||
|
||
## Enarx Release | ||
|
||
### Update and release prerequiste crates (this may be an optional step) | ||
This includes `xsave`, `sallyport`, etc crates: | ||
- Ensure all approved PRs are merged | ||
- Get latest updates and checkout branch | ||
```bash | ||
git fetch --all | ||
git checkout main | ||
git pull --ff-only | ||
git checkout -b update/deps | ||
``` | ||
- Update dependencies | ||
```bash | ||
cargo update | ||
``` | ||
- Determine if crate builds and if it works | ||
```bash | ||
cargo clean | ||
cargo test | ||
``` | ||
- Determine version bump by reviewing output of `git log` | ||
- Update and bump version in `Cargo.toml` | ||
- Run `cargo test` again | ||
- Commit change and push to repo | ||
```bash | ||
git commit -asS -m 'Release vX.X.X' | ||
git push origin | ||
``` | ||
- Confirm that changes passed on CI | ||
- Create a git tag | ||
```bash | ||
git tag vX.X.X | ||
git push --tags origin vX.X.X | ||
``` | ||
- Cargo publish | ||
```bash | ||
cargo publish | ||
``` | ||
|
||
### The Enarx release itself | ||
- Get latest updates and checkout branch | ||
```bash | ||
git fetch --all | ||
git checkout main | ||
git pull --ff-only | ||
git checkout -b release-<my fancy new version> | ||
``` | ||
- Bump version inside sub-crate `internal/{shim-sev,shim-sgx,wasmdr}/Cargo.toml` files | ||
```bash | ||
export OLD_VERSION=$(grep '^version =' Cargo.toml | cut -d'=' -f 2) | ||
export NEW_VERSION='"<my fancy new version>"' | ||
for d in internal/*/ ; do (cd "$d" \ | ||
sed -i \""s/^version = ${OLD_VERSION}/version = ${NEW_VERSION}/"\" Cargo.toml \ | ||
cargo update -p $(basename ${d}) \ | ||
git mv $i ${i%.toml}.tml ) \ | ||
done | ||
``` | ||
- Run unittests | ||
```bash | ||
cargo clean | ||
cargo test | ||
``` | ||
- Check cargo manifest | ||
```bash | ||
cargo package --allow-dirty -l | ||
``` | ||
- Commit change and push to repo | ||
```bash | ||
git commit -asS -m "Release v${NEW_VERSION}" | ||
git push origin | ||
``` | ||
- Create and push `git` tag | ||
```bash | ||
git tag --sign v${NEW_VERSION} | ||
git push --tags origin HEAD | ||
``` | ||
- Package and publish Enarx crate | ||
```bash | ||
cargo publish -v | ||
``` | ||
- Restore Cargo.tml files to Cargo.toml files | ||
```bash | ||
for i in internal/*/Cargo.tml; do git mv $i ${i%.tml}.toml; done | ||
git commit -asS -m 'chore: put back Cargo.toml' | ||
git push origin | ||
``` | ||
- Create a PR | ||
```bash | ||
gh pr create --title "Release v${NEW_VERSION}" | ||
- Create draft GitHub release | ||
```bash | ||
gh release create -d --generate-notes v${NEW_VERSION} | ||
``` | ||
- Update GitHub release notes, merge release PR and publish GitHub release |
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