forked from kajacx/wasm-bridge
-
Notifications
You must be signed in to change notification settings - Fork 3
/
release.sh
executable file
·53 lines (42 loc) · 1.17 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
52
53
#!/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-macros\ = crates/wasm-bridge/Cargo.toml
grep wasm-bridge-js\ = crates/wasm-bridge/Cargo.toml
grep wasm-bridge-macros\ = crates/wasm-bridge-js/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-js
cargo publish -p wasm-bridge
echo
echo Creating git tag
git tag "v$version"
git push origin "v$version"
echo
echo "Everything done, version $version successfully released :-)"