-
Notifications
You must be signed in to change notification settings - Fork 20
/
publish.sh
executable file
·83 lines (69 loc) · 1.49 KB
/
publish.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
# Before publishing, we need to download the cw-plus artifacts
./before_publish.sh
# Before publishing, test the version with the Abstract implementation to make sure you're not breaking important API
set -o errexit -o nounset -o pipefail
command -v shellcheck >/dev/null && shellcheck "$0"
function print_usage() {
echo "Usage: $0 [-h|--help]"
echo "Publishes crates to crates.io."
}
if [ $# = 1 ] && { [ "$1" = "-h" ] || [ "$1" = "--help" ] ; }
then
print_usage
exit 1
fi
# these are imported by other packages
BASE_PACKAGES="
cw-orch-contract-derive
cw-orch-fns-derive
cw-orch-core
cw-orch-traits
cw-orch-mock
cw-orch-networks
"
INTERCHAIN_PACKAGES="
interchain-core
starship
interchain-daemon
interchain-mock
proto
"
CORE="cw-orch-daemon cw-orch cw-orch-interchain"
INTEGRATIONS="
cw-plus
"
for pack in $BASE_PACKAGES; do
(
cd "packages/$pack"
echo "Publishing $pack"
cargo publish
)
done
for lib in $INTERCHAIN; do
(
cd "packages/interchain/$lib"
echo "Publishing $lib"
cargo publish
)
done
for lib in $CORE; do
(
cd "$lib"
echo "Publishing $lib"
cargo publish
)
done
for integration in $INTEGRATIONS; do
(
cd "packages/integrations/$integration"
echo "Publishing $integration"
cargo publish
)
done
echo "Everything is published!"
#
# VERSION=$(< Cargo.toml grep -m 1 version | sed 's/-/_/g' | grep -o '".*"' | sed 's/"//g');
# git push
# git tag v"$VERSION"
# git push origin v"$VERSION"