forked from dimforge/sparkl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.sh
executable file
·46 lines (35 loc) · 1.16 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
#! /bin/bash
tmp=$(mktemp -d)
echo "$tmp"
cp -r src "$tmp"/.
cp -r src_core "$tmp"/.
cp -r src_kernels "$tmp"/.
cp -r resources "$tmp"/.
cp -r LICENSE README.md "$tmp"/.
### Publish the 2D version.
sed 's#\.\./\.\./src_core#src_core#g' crates/sparkl2d-core/Cargo.toml > "$tmp"/Cargo.toml
currdir=$(pwd)
cd "$tmp" && cargo publish
cd "$currdir" || exit
sed 's#\.\./\.\./src_kernels#src_kernels#g' crates/sparkl2d-kernels/Cargo.toml > "$tmp"/Cargo.toml
currdir=$(pwd)
cd "$tmp" && cargo publish --no-verify
cd "$currdir" || exit
sed 's#\.\./\.\./src#src#g' crates/sparkl2d/Cargo.toml > "$tmp"/Cargo.toml
currdir=$(pwd)
cd "$tmp" && cargo publish
cd "$currdir" || exit
### Publish the 3D version.
sed 's#\.\./\.\./src_core#src_core#g' crates/sparkl3d-core/Cargo.toml > "$tmp"/Cargo.toml
currdir=$(pwd)
cd "$tmp" && cargo publish
cd "$currdir" || exit
sed 's#\.\./\.\./src_kernels#src_kernels#g' crates/sparkl3d-kernels/Cargo.toml > "$tmp"/Cargo.toml
currdir=$(pwd)
cd "$tmp" && cargo publish --no-verify
cd "$currdir" || exit
sed 's#\.\./\.\./src#src#g' crates/sparkl3d/Cargo.toml > "$tmp"/Cargo.toml
currdir=$(pwd)
cd "$tmp" && cargo publish
cd "$currdir" || exit
rm -rf "$tmp"