aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2020-11-30 16:08:28 +0100
committerCrozet Sébastien <developer@crozet.re>2020-11-30 16:08:28 +0100
commit1ac068b2066a75ca51e4d023c2d634971b932f7e (patch)
tree28b871ee7041f05c8c83d019981545bf2524084f
parentab7fdb5f4e5b67ab757e9d5135ab62abfd001846 (diff)
downloadrapier-1ac068b2066a75ca51e4d023c2d634971b932f7e.tar.gz
rapier-1ac068b2066a75ca51e4d023c2d634971b932f7e.tar.bz2
rapier-1ac068b2066a75ca51e4d023c2d634971b932f7e.zip
Add script to publish the testbed.
-rwxr-xr-xpublish-testbeds.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/publish-testbeds.sh b/publish-testbeds.sh
new file mode 100755
index 0000000..2b2e068
--- /dev/null
+++ b/publish-testbeds.sh
@@ -0,0 +1,26 @@
+#! /bin/bash
+
+tmp=$(mktemp -d)
+
+echo "$tmp"
+
+cp -r src "$tmp"/.
+cp -r src_testbed "$tmp"/.
+cp -r build "$tmp"/.
+cp -r LICENSE README.md "$tmp"/.
+
+### Publish the 2D version.
+sed 's#\.\./\.\./src#src#g' build/rapier_testbed2d/Cargo.toml > "$tmp"/Cargo.toml
+sed -i 's#\.\./rapier#./build/rapier#g' "$tmp"/Cargo.toml
+currdir=$(pwd)
+cd "$tmp" && cargo publish
+cd "$currdir" || exit
+
+
+### Publish the 3D version.
+sed 's#\.\./\.\./src#src#g' build/rapier_testbed3d/Cargo.toml > "$tmp"/Cargo.toml
+sed -i 's#\.\./rapier#./build/rapier#g' "$tmp"/Cargo.toml
+cp -r LICENSE README.md "$tmp"/.
+cd "$tmp" && cargo publish
+
+rm -rf "$tmp"