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

Commit 738997a

Browse files
committed
feat(release): prepare release notes
Signed-off-by: Paul Pietkiewicz <paul@profian.com>
1 parent 0d365ba commit 738997a

File tree

2 files changed

+188
-1
lines changed

2 files changed

+188
-1
lines changed

Diff for: docs/Contributing/Release.md

+187
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
# Release Process
2+
3+
## Prerequisites:
4+
- Prepare release notes
5+
6+
7+
## Weekly chores
8+
### Enarx dependency update
9+
- Update local code
10+
```bash
11+
git fetch --all
12+
git checkout origin/main
13+
```
14+
- Checkout chore branch
15+
```bash
16+
git checkout -b chore/cargo-update
17+
```
18+
- Run `cargo update` within all individual sub-crates
19+
```bash
20+
cargo update --manifest-path=internal/shim-kvm/Cargo.toml
21+
cargo update --manifest-path=internal/shim-sgx/Cargo.toml
22+
cargo update --manifest-path=src/bin/wasmldr/Cargo.toml
23+
cargo update --manifest-path=Cargo.toml
24+
```
25+
- Git commit sub-crate update
26+
```bash
27+
git commit -asS -m 'chore(deps): update internal crate dependencies'
28+
```
29+
- Git commit sub-crate update
30+
```bash
31+
git commit -asS -m 'chore(deps): update Enarx dependencies'
32+
```
33+
- Run build and tests
34+
```bash
35+
cargo clean
36+
cargo build
37+
cargo tests
38+
```
39+
- Create PR
40+
```bash
41+
git push origin chore/cargo-update
42+
gh pr create --title "chore(deps): update Enarx dependencies"
43+
```
44+
45+
46+
## Enarx Release
47+
> **NOTE: ** The list of crates that need to be updated for a release can be seen by running this following command: `grep -R 'git+https' *.lock | sort | uniq`
48+
49+
### Update and release prerequiste crates
50+
> **NOTE: ** This may be an optional step dependant on whether there are relevant changes in the prerequisite crates (e.g. `xsave`, `sallyport`, etc.):
51+
- Determine expected version by reviewing output of `git log`
52+
- Set new version
53+
```bash
54+
export MAJOR=0
55+
export MINOR=2
56+
export PATCH=2
57+
export NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
58+
```
59+
- Ensure all approved PRs are merged
60+
- Get latest updates and checkout branch
61+
```bash
62+
git fetch --all
63+
git checkout origin/main
64+
git checkout -b "b${MAJOR}.${MINOR}.z"
65+
```
66+
- Update dependencies
67+
```bash
68+
cargo update
69+
```
70+
- Determine if crate builds and if it works
71+
```bash
72+
cargo clean
73+
cargo build
74+
cargo test
75+
```
76+
- Update version in `Cargo.toml`
77+
```bash
78+
sed -i 's/^version = .*/version = \"'${NEW_VERSION}'\"/' Cargo.toml
79+
cargo update -p $(grep name Cargo.toml | cut -d'"' -f2)
80+
```
81+
- Run `cargo test` again
82+
```bash
83+
cargo clean
84+
cargo build
85+
cargo test
86+
```
87+
- Commit change and push to repo
88+
```bash
89+
git commit -asS -m "chore(release): Release v${NEW_VERSION}"
90+
git push origin
91+
```
92+
- Confirm that changes passed on CI
93+
- Create a git tag
94+
```bash
95+
git tag --sign -m "chore(release): Release v${NEW_VERSION}" v${NEW_VERSION}
96+
git push --tags origin "b${MAJOR}.${MINOR}.z"
97+
```
98+
- Cargo publish
99+
```bash
100+
cargo publish
101+
```
102+
- Create a PR
103+
```bash
104+
gh pr create --title "Release v${NEW_VERSION}"
105+
```
106+
- Publish crate:
107+
```bash
108+
cargo publish -v
109+
```
110+
111+
### The Enarx release itself
112+
- Determine expected version by reviewing output of `git log`
113+
- Set new version
114+
```bash
115+
export MAJOR=0
116+
export MINOR=2
117+
export PATCH=2
118+
export NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
119+
```
120+
- Get latest updates and checkout branch
121+
```bash
122+
git fetch --all
123+
git checkout origin/main
124+
git checkout -b "b${MAJOR}.${MINOR}.z"
125+
```
126+
- Bump version inside sub-crate `src/bin/{shim-kvm,shim-sgx,wasmdr}/Cargo.toml` files
127+
```bash
128+
for d in src/bin/*/ ; do ( cd "$d"
129+
sed -i 's/^version = .*/version = \"'${NEW_VERSION}'\"/' Cargo.toml
130+
cargo update -p $(basename ${d})
131+
git mv Cargo.toml Cargo.tml )
132+
done
133+
sed -i 's/^version = .*/version = \"'${NEW_VERSION}'\"/' Cargo.toml
134+
cargo update -p $(grep name Cargo.toml | cut -d'"' -f2)
135+
```
136+
- _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_
137+
```bash
138+
export UPDATED_PREREQUISTES=(xsave sallyport)
139+
for d in src/bin/*/ ; do ( cd "$d"
140+
for p in ${UPDATED_PREREQUISTES[@]]}; do
141+
cargo update -p "${p}"
142+
done
143+
done
144+
for p in ${UPDATED_PREREQUISTES[@]]}; do cargo update -p ${p}; done
145+
```
146+
- Run unit tests
147+
```bash
148+
cargo clean
149+
cargo build
150+
cargo test
151+
```
152+
- Check cargo manifest
153+
```bash
154+
cargo package --allow-dirty -l
155+
```
156+
- Commit change and push to repo
157+
```bash
158+
git commit -asS -m "chore(release): Release v${NEW_VERSION}"
159+
git push origin "release/${NEW_VERSION}"
160+
```
161+
- Create and push `git` tag
162+
```bash
163+
git tag --sign -m "chore(release): Release v${NEW_VERSION}" v${NEW_VERSION}
164+
git push --tags origin "b${MAJOR}.${MINOR}.z"
165+
```
166+
- Package and publish Enarx crate
167+
```bash
168+
cargo publish -v
169+
```
170+
- Create a PR
171+
```bash
172+
gh pr create --title "Release v${NEW_VERSION}" -b
173+
- Create draft GitHub release
174+
```bash
175+
gh release create -d --generate-notes "v${NEW_VERSION}"
176+
```
177+
- Update GitHub release notes
178+
- Merge release PR
179+
- Once PR is merged, then push the tag
180+
```bash
181+
git fetch --all
182+
git push --tags upstream "b${MAJOR}.${MINOR}.z"
183+
```
184+
- Publish GitHub release
185+
-
186+
- Send notification to RocketChat #annoucements & #general channels
187+
- Assign issue to post release to social media channels

Diff for: sidebars.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const sidebars = {
4141
{
4242
type: 'category',
4343
label: 'Contributing Guide',
44-
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'],
44+
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'],
4545
},
4646
{
4747
type: 'category',

0 commit comments

Comments
 (0)