-
Notifications
You must be signed in to change notification settings - Fork 7
/
release.sh
executable file
·51 lines (40 loc) · 1.04 KB
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/sh
set -e
version=$(grep '^version' Cargo.toml | sed -E 's#.*?"(.*?)".*#\1#')
echo You are about to release version $version.
echo
echo Please check that all version references have been updated:
grep '^wasm-bridge' Cargo.toml
echo
echo Please make sure that the CHANGELOG has today"'"s date
grep "$version" CHANGELOG.md
echo
echo Also, review the git status
git status
echo
echo Looks good? "(y/n)"
read resp
if [ "$resp" != "y" ] && [ "$resp" != "Y" ]; then
echo "Never mind then, bye"
exit
fi
echo Ok then, let me check that automated tests pass ...
sh run_checks.sh
echo Everything ok
echo FINAL QUESTION: RELEASE A NEW VERSION TO crates.io? "(y/n)"
read resp
if [ "$resp" != "y" ] && [ "$resp" != "Y" ]; then
echo "Never mind then, bye"
exit
fi
echo
echo Releasing crates
cargo publish -p wasm-bridge-macros
cargo publish -p wasm-bridge
cargo publish -p wasm-bridge-wasi
echo
echo Creating git tag
git tag "v$version"
git push origin "v$version"
echo
echo "Everything done, version $version successfully released :-)"