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

Commit a1e9922

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

File tree

2 files changed

+115
-1
lines changed

2 files changed

+115
-1
lines changed

docs/Contributing/Release.md

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# How to Release
2+
3+
## Prerequisites:
4+
- Prepare release notes
5+
- Update all `rust` channels (nightly, beta & stable)
6+
7+
## Update and release prerequiste crates
8+
9+
### Prerequisites
10+
This includes `xsave`, `sallyport`, etc crates:
11+
- Ensure all approved PRs are merged
12+
- Get latest updates
13+
```bash
14+
git fetch --all
15+
git rebase upstream/main
16+
```
17+
- Determine if crate builds and if it works
18+
```bash
19+
cargo clean
20+
cargo <+nightly | +beta> test
21+
```
22+
- Update dependencies
23+
```bash
24+
cargo update
25+
```
26+
- Determine version bump by reviewing output of `git log`
27+
- Update and bump version in `Cargo.toml`
28+
- Run `cargo test` again
29+
- Commit change and push to repo
30+
```bash
31+
git commit -asm 'Release vX.X.X'
32+
git push origin
33+
```
34+
- Confirm that changes passed on CI
35+
- Create a git tag
36+
```bash
37+
git tag vX.X.X
38+
git push origin vX.X.X
39+
```
40+
- Cargo publish
41+
```bash
42+
cargo +beta publish
43+
```
44+
45+
### `enarx` Pre-release
46+
- Ensure all PRs are merged and that all CI tests passes
47+
- Check to see `Cargo.toml` is refering to the latest updated prerequisite crates
48+
- Run cargo-update on all individual sub-crates in updated packages are referenced
49+
```bash
50+
cd internal/
51+
for d in ./*/ ; do (cd "$d" && cargo update); done
52+
cd ..
53+
```
54+
- Git commit sub-crate update
55+
```bash
56+
git commit -asm 'Updated Enarx sub-crate dependencies'
57+
```
58+
- Run cargo update on `enarx`
59+
```bash
60+
cargo update
61+
```
62+
- Git commit sub-crate update
63+
```bash
64+
git commit -asm 'Updated Enarx dependencies'
65+
```
66+
- Run build and tests
67+
```bash
68+
cargo clean
69+
cargo +nightly build
70+
cargo +nightly tests
71+
```
72+
73+
## `enarx` Release
74+
- Bump version inside sub-crate `internal/{shim-sev,shim-sgx,wasmdr}/Cargo.toml` files
75+
```bash
76+
cd internal/
77+
for d in ./*/ ; do (cd "$d" && sed -i '' 's/^version = "<OLD_VERSION>"/version = "<NEW_VERSION>"/' Cargo.toml); done
78+
```
79+
- Rename `Cargo.toml` TOML files to work around the fact that `cargo` does not allow publishing subcrates
80+
```bash
81+
for i in internal/*/Cargo.toml; do git mv $i ${i%.toml}.tml; done
82+
```
83+
- Check cargo manifest with `cargo package --allow-dirty`
84+
- Run unittests `cargo test`
85+
- Commit change and push to repo
86+
```bash
87+
git commit -asm 'Release vX.X.X'
88+
git push origin`
89+
```
90+
- Create and push `git` tag
91+
```bash
92+
git tag v.X.X.X
93+
```
94+
- Create and push `git` tag
95+
```bash
96+
git tag v.X.X.X
97+
git push origin HEAD
98+
git push --tags origin HEAD
99+
```
100+
- Package and publish Enarx crate
101+
```bash
102+
cargo publish -v
103+
```
104+
- Restore Cargo.tml files to Cargo.toml fils
105+
```bash
106+
for i in internal/*/Cargo.tml; do git mv $i ${i%.tml}.toml; done
107+
git commit -asm 'chore: put back Cargo.toml'
108+
git push origin HEAD
109+
```
110+
- Create draft GitHub release
111+
```bash
112+
gh release create -d --generate-notes vX.X.X
113+
```
114+
- Update suppliment GitHub release notes and complete 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)