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

Commit 0713d90

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

File tree

2 files changed

+170
-1
lines changed

2 files changed

+170
-1
lines changed

docs/Contributing/Release.md

+169
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
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 origin/main
14+
```
15+
- Checkout chore branch
16+
```bash
17+
git checkout -b chore/cargo-update
18+
```
19+
- Run `cargo update` within all individual sub-crates
20+
```bash
21+
for d in internal/*/ ; do (cd "$d" && cargo update); done
22+
```
23+
- Git commit sub-crate update
24+
```bash
25+
git commit -asS -m 'chore(deps): update internal crate dependencies'
26+
```
27+
- Run cargo update on `enarx`
28+
```bash
29+
cargo update
30+
```
31+
- Git commit sub-crate update
32+
```bash
33+
git commit -asS -m 'chore(deps): update Enarx dependencies'
34+
```
35+
- Run build and tests
36+
```bash
37+
cargo clean
38+
cargo build
39+
cargo tests
40+
```
41+
- Create PR
42+
```bash
43+
git push origin chore/cargo-update
44+
gh pr create --title "chore(deps): update Enarx dependencies"
45+
```
46+
47+
48+
## Enarx Release
49+
50+
### Update and release prerequiste crates
51+
> **NOTE: ** This may be an optional step dependant on whether there are relevant changes in the prerequisite crates (e.g. `xsave`, `sallyport`, etc.):
52+
- Set new version
53+
```bash
54+
export NEW_VERSION="<my fancy new version e.g. 0.2.2>"
55+
```
56+
- Ensure all approved PRs are merged
57+
- Get latest updates and checkout branch
58+
```bash
59+
git fetch --all
60+
git checkout origin/main
61+
git checkout -b release/v${NEW_VERSION}
62+
```
63+
- Update dependencies
64+
```bash
65+
cargo update
66+
```
67+
- Determine if crate builds and if it works
68+
```bash
69+
cargo clean
70+
cargo build
71+
cargo test
72+
```
73+
- Determine expected version by reviewing output of `git log`
74+
- Update and bump version in `Cargo.toml`
75+
- Run `cargo test` again
76+
- Commit change and push to repo
77+
```bash
78+
git commit -asS -m "chore(release): Release v${NEW_VERSION}"
79+
git push origin
80+
```
81+
- Confirm that changes passed on CI
82+
- Create a git tag
83+
```bash
84+
git tag --sign -m "chore(release): Release v${NEW_VERSION}" v${NEW_VERSION}
85+
git push --tags origin v${NEW_VERSION}
86+
```
87+
- Cargo publish
88+
```bash
89+
cargo publish
90+
```
91+
92+
### The Enarx release itself
93+
- Set new version
94+
```bash
95+
export NEW_VERSION="<my fancy new version e.g. 0.2.2>"
96+
```
97+
- Get latest updates and checkout branch
98+
```bash
99+
git fetch --all
100+
git checkout origin/main
101+
git checkout -b release/v${NEW_VERSION}
102+
```
103+
- Bump version inside sub-crate `internal/{shim-sev,shim-sgx,wasmdr}/Cargo.toml` files
104+
```bash
105+
for d in internal/*/ ; do ( cd "$d"
106+
sed -i 's/^version = .*/version = \"'${NEW_VERSION}'\"/' Cargo.toml
107+
cargo update -p $(basename ${d})
108+
git mv Cargo.toml Cargo.tml )
109+
done
110+
sed -i 's/^version = .*/version = \"'${NEW_VERSION}'\"/' Cargo.toml
111+
cargo update -p enarx
112+
```
113+
- _POTENTIALLY OPTIONAL STEP: If there are any changes in the prerequisite crates (e.g. `xsave`, `sallyport`, etc) then it will be required to manually update the crates now_
114+
```bash
115+
export UPDATED_PREREQUISTES=(xsave sallyport)
116+
for d in internal/*/ ; do ( cd "$d"
117+
for p in ${UPDATED_PREREQUISTES[@]]}; do
118+
cargo update -p ${p}
119+
done
120+
done
121+
for p in ${UPDATED_PREREQUISTES[@]]}; do cargo update -p ${p}; done
122+
```
123+
- Run unit tests
124+
```bash
125+
cargo clean
126+
cargo build
127+
cargo test
128+
```
129+
- Rename Cargo.toml to Cargo.tml in sub-crates to address `cargo` sub-crate limitation
130+
```bash
131+
for d in internal/*/ ; do ( cd "$d"
132+
git mv Cargo.toml Cargo.tml )
133+
done
134+
- Check cargo manifest
135+
```bash
136+
cargo package --allow-dirty -l
137+
```
138+
- Commit change and push to repo
139+
```bash
140+
git commit -asS -m "chore(release): Release v${NEW_VERSION}"
141+
git push origin release/${NEW_VERSION}
142+
```
143+
- Create and push `git` tag
144+
```bash
145+
git tag --sign -m "chore(release): Release v${NEW_VERSION}" v${NEW_VERSION}
146+
git push --tags origin v${NEW_VERSION}
147+
```
148+
- Package and publish Enarx crate
149+
```bash
150+
cargo publish -v
151+
```
152+
- Restore Cargo.tml files to Cargo.toml files
153+
```bash
154+
for i in internal/*/Cargo.tml; do git mv $i ${i%.tml}.toml; done
155+
git commit -asS -m 'chore(release): put back Cargo.toml files'
156+
git push origin
157+
```
158+
- Create a PR
159+
```bash
160+
gh pr create --title "Release v${NEW_VERSION}"
161+
- Create draft GitHub release
162+
```bash
163+
gh release create -d --generate-notes v${NEW_VERSION}
164+
```
165+
- Update GitHub release notes
166+
- Merge release PR
167+
- Publish GitHub release
168+
- Send notification to RocketChat #annoucements & #general channels
169+
- Assign issue to post release to social media channels

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)