Skip to content
This repository was archived by the owner on May 3, 2022. It is now read-only.

Commit 2bb3feb

Browse files
committed
Prepare release notes
Signed-off-by: Paul Pietkiewicz <[email protected]>
1 parent 10612fd commit 2bb3feb

File tree

2 files changed

+144
-1
lines changed

2 files changed

+144
-1
lines changed

docs/Contributing/Release.md

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# Release Process
2+
3+
4+
## Prerequisites:
5+
- Prepare release notes
6+
7+
8+
## Weekly chores
9+
### Enarx dependency update
10+
- Update local code
11+
```bash
12+
git fetch --all
13+
git checkout main
14+
git pull --ff-only
15+
```
16+
- Checkout chore branch
17+
```bash
18+
git checkout -b update-prerequisites
19+
```
20+
- Check to see `Cargo.toml` is refering to the latest updated prerequisite crates
21+
- Run cargo-update on all individual sub-crates in updated packages are referenced
22+
```bash
23+
for d in internal/*/ ; do (cd "$d" && cargo update); done
24+
```
25+
- Git commit sub-crate update
26+
```bash
27+
git commit -asm 'Updated Enarx sub-crate dependencies'
28+
```
29+
- Run cargo update on `enarx`
30+
```bash
31+
cargo update
32+
```
33+
- Git commit sub-crate update
34+
```bash
35+
git commit -asm 'Updated Enarx dependencies'
36+
```
37+
- Run build and tests
38+
```bash
39+
cargo clean
40+
cargo build
41+
cargo tests
42+
```
43+
- Create PR
44+
```bash
45+
git push origin update-prerequisites
46+
```
47+
48+
49+
## Enarx Release
50+
51+
### Update and release prerequiste crates (this may be an optional step)
52+
This includes `xsave`, `sallyport`, etc crates:
53+
- Ensure all approved PRs are merged
54+
- Get latest updates and checkout branch
55+
```bash
56+
git fetch --all
57+
git checkout main
58+
git pull --ff-only
59+
git checkout -b update/deps
60+
```
61+
- Update dependencies
62+
```bash
63+
cargo update
64+
```
65+
- Determine if crate builds and if it works
66+
```bash
67+
cargo clean
68+
cargo test
69+
```
70+
- Determine version bump by reviewing output of `git log`
71+
- Update and bump version in `Cargo.toml`
72+
- Run `cargo test` again
73+
- Commit change and push to repo
74+
```bash
75+
git commit -asS -m 'Release vX.X.X'
76+
git push origin
77+
```
78+
- Confirm that changes passed on CI
79+
- Create a git tag
80+
```bash
81+
git tag vX.X.X
82+
git push --tags origin vX.X.X
83+
```
84+
- Cargo publish
85+
```bash
86+
cargo publish
87+
```
88+
89+
### The Enarx release itself
90+
- Get latest updates and checkout branch
91+
```bash
92+
git fetch --all
93+
git checkout main
94+
git pull --ff-only
95+
git checkout -b release-<my fancy new version>
96+
```
97+
- Bump version inside sub-crate `internal/{shim-sev,shim-sgx,wasmdr}/Cargo.toml` files
98+
```bash
99+
export OLD_VERSION=$(grep '^version =' Cargo.toml | cut -d'=' -f 2)
100+
export NEW_VERSION='"<my fancy new version>"'
101+
for d in internal/*/ ; do (cd "$d" \
102+
sed -i \""s/^version = ${OLD_VERSION}/version = ${NEW_VERSION}/"\" Cargo.toml \
103+
cargo update -p $(basename ${d}) \
104+
git mv $i ${i%.toml}.tml ) \
105+
done
106+
```
107+
- Run unittests
108+
```bash
109+
cargo clean
110+
cargo test
111+
```
112+
- Check cargo manifest
113+
```bash
114+
cargo package --allow-dirty -l
115+
```
116+
- Commit change and push to repo
117+
```bash
118+
git commit -asS -m "Release v${NEW_VERSION}"
119+
git push origin
120+
```
121+
- Create and push `git` tag
122+
```bash
123+
git tag --sign v${NEW_VERSION}
124+
git push --tags origin HEAD
125+
```
126+
- Package and publish Enarx crate
127+
```bash
128+
cargo publish -v
129+
```
130+
- Restore Cargo.tml files to Cargo.toml files
131+
```bash
132+
for i in internal/*/Cargo.tml; do git mv $i ${i%.tml}.toml; done
133+
git commit -asS -m 'chore: put back Cargo.toml'
134+
git push origin
135+
```
136+
- Create a PR
137+
```bash
138+
gh pr create --title "Release v${NEW_VERSION}"
139+
- Create draft GitHub release
140+
```bash
141+
gh release create -d --generate-notes v${NEW_VERSION}
142+
```
143+
- Update GitHub release notes, merge release PR and publish GitHub release

sidebars.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const sidebars = {
3131
{
3232
type: 'category',
3333
label: 'Contributing Guide',
34-
items: ['Contributing/Introduction','Contributing/Onboarding','Contributing/Code','Contributing/Coding-Style','Contributing/Git-hook','Contributing/PRs','Contributing/Issues','Contributing/RFCs','Contributing/Docs','Contributing/Outreach','Contributing/Lab'],
34+
items: ['Contributing/Introduction','Contributing/Onboarding','Contributing/Code','Contributing/Coding-Style','Contributing/Git-hook','Contributing/PRs','Contributing/Issues','Contributing/RFCs','Contributing/Docs','Contributing/Outreach','Contributing/Lab', 'Contributing/Release'],
3535
},
3636
{
3737
type: 'category',

0 commit comments

Comments
 (0)