forked from amethyst/amethyst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.sh
executable file
·62 lines (53 loc) · 1.14 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
#! /bin/bash
set -e
BACKEND="vulkan"
if [[ `uname` == "Darwin" ]] ; then
BACKEND="metal"
fi
# Wave one -- crates without `amethyst_rendy` dependency.
# The order is important because of inter-dependencies (see docs/PUBLISHING.md)
crates=(
amethyst_config
amethyst_derive
amethyst_error
amethyst_core
amethyst_assets
amethyst_network
amethyst_window
amethyst_audio
amethyst_locale
amethyst_input
amethyst_controls
)
for crate in "${crates[@]}"
do
echo "Publishing ${crate}"
(cd $crate && cargo publish)
# Rate limit ourselves as `crates.io` takes a while to update cache.
sleep 30
done
# Wave two -- crates with `amethyst_rendy` dependency.
#
# Must be built with a graphics backend to publish.
crates=(
amethyst_rendy
amethyst_tiles
amethyst_ui
amethyst_utils
amethyst_animation
amethyst_gltf
amethyst
amethyst_test
)
for crate in "${crates[@]}"
do
echo "Publishing ${crate}"
if test "${crate}" = "amethyst"
then
cargo publish --features $BACKEND
else
(cd $crate && cargo publish --features $BACKEND)
fi
# Rate limit ourselves as `crates.io` takes a while to update cache.
sleep 30
done