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

Commit 19bfec9

Browse files
committed
Prepare release notes
Signed-off-by: Paul Pietkiewicz <paul@profian.com>
1 parent 10612fd commit 19bfec9

File tree

2 files changed

+180
-1
lines changed

2 files changed

+180
-1
lines changed

Diff for: docs/Contributing/Release.md

+179
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
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+
- Determine expected version by reviewing output of `git log`
53+
- Set new version
54+
```bash
55+
export NEW_VERSION="<my fancy new version e.g. 0.2.2>"
56+
```
57+
- Ensure all approved PRs are merged
58+
- Get latest updates and checkout branch
59+
```bash
60+
git fetch --all
61+
git checkout origin/main
62+
git checkout -b release/v${NEW_VERSION}
63+
```
64+
- Update dependencies
65+
```bash
66+
cargo update
67+
```
68+
- Determine if crate builds and if it works
69+
```bash
70+
cargo clean
71+
cargo build
72+
cargo test
73+
```
74+
- Update version in `Cargo.toml`
75+
```bash
76+
sed -i 's/^version = .*/version = \"'${NEW_VERSION}'\"/' Cargo.toml
77+
cargo update -p $(grep name Cargo.toml | cut -d'"' -f2)
78+
```
79+
- Run `cargo test` again
80+
```bash
81+
cargo clean
82+
cargo build
83+
cargo test
84+
```
85+
- Commit change and push to repo
86+
```bash
87+
git commit -asS -m "chore(release): Release v${NEW_VERSION}"
88+
git push origin
89+
```
90+
- Confirm that changes passed on CI
91+
- Create a git tag
92+
```bash
93+
git tag --sign -m "chore(release): Release v${NEW_VERSION}" v${NEW_VERSION}
94+
git push --tags origin v${NEW_VERSION}
95+
```
96+
- Cargo publish
97+
```bash
98+
cargo publish
99+
```
100+
101+
### The Enarx release itself
102+
- Determine expected version by reviewing output of `git log`
103+
- Set new version
104+
```bash
105+
export NEW_VERSION="<my fancy new version e.g. 0.2.2>"
106+
```
107+
- Get latest updates and checkout branch
108+
```bash
109+
git fetch --all
110+
git checkout origin/main
111+
git checkout -b release/v${NEW_VERSION}
112+
```
113+
- Bump version inside sub-crate `internal/{shim-sev,shim-sgx,wasmdr}/Cargo.toml` files
114+
```bash
115+
for d in internal/*/ ; do ( cd "$d"
116+
sed -i 's/^version = .*/version = \"'${NEW_VERSION}'\"/' Cargo.toml
117+
cargo update -p $(basename ${d})
118+
git mv Cargo.toml Cargo.tml )
119+
done
120+
sed -i 's/^version = .*/version = \"'${NEW_VERSION}'\"/' Cargo.toml
121+
cargo update -p enarx
122+
```
123+
- _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_
124+
```bash
125+
export UPDATED_PREREQUISTES=(xsave sallyport)
126+
for d in internal/*/ ; do ( cd "$d"
127+
for p in ${UPDATED_PREREQUISTES[@]]}; do
128+
cargo update -p ${p}
129+
done
130+
done
131+
for p in ${UPDATED_PREREQUISTES[@]]}; do cargo update -p ${p}; done
132+
```
133+
- Run unit tests
134+
```bash
135+
cargo clean
136+
cargo build
137+
cargo test
138+
```
139+
- Rename Cargo.toml to Cargo.tml in sub-crates to address `cargo` sub-crate limitation
140+
```bash
141+
for d in internal/*/ ; do ( cd "$d"
142+
git mv Cargo.toml Cargo.tml )
143+
done
144+
- Check cargo manifest
145+
```bash
146+
cargo package --allow-dirty -l
147+
```
148+
- Commit change and push to repo
149+
```bash
150+
git commit -asS -m "chore(release): Release v${NEW_VERSION}"
151+
git push origin release/${NEW_VERSION}
152+
```
153+
- Create and push `git` tag
154+
```bash
155+
git tag --sign -m "chore(release): Release v${NEW_VERSION}" v${NEW_VERSION}
156+
git push --tags origin v${NEW_VERSION}
157+
```
158+
- Package and publish Enarx crate
159+
```bash
160+
cargo publish -v
161+
```
162+
- Restore Cargo.tml files to Cargo.toml files
163+
```bash
164+
for i in internal/*/Cargo.tml; do git mv $i ${i%.tml}.toml; done
165+
git commit -asS -m 'chore(release): put back Cargo.toml files'
166+
git push origin
167+
```
168+
- Create a PR
169+
```bash
170+
gh pr create --title "Release v${NEW_VERSION}"
171+
- Create draft GitHub release
172+
```bash
173+
gh release create -d --generate-notes v${NEW_VERSION}
174+
```
175+
- Update GitHub release notes
176+
- Merge release PR
177+
- Publish GitHub release
178+
- Send notification to RocketChat #annoucements & #general channels
179+
- Assign issue to post release to social media channels

Diff for: 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)