aboutsummaryrefslogtreecommitdiff
path: root/publish.sh
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2021-06-02 17:15:46 +0200
committerGitHub <noreply@github.com>2021-06-02 17:15:46 +0200
commit6ba1c9dec184adcba2c68cc1851dc05587fd0bf0 (patch)
treeb672cfc4db1d2f426dad931d77098ecb4a600358 /publish.sh
parent3bac79ecacdeaa18de19127b7a6c82cbfab29d14 (diff)
parentbde6657287cd32a801abb996322c520673406418 (diff)
downloadrapier-6ba1c9dec184adcba2c68cc1851dc05587fd0bf0.tar.gz
rapier-6ba1c9dec184adcba2c68cc1851dc05587fd0bf0.tar.bz2
rapier-6ba1c9dec184adcba2c68cc1851dc05587fd0bf0.zip
Merge pull request #196 from dimforge/api_changes
More API changes
Diffstat (limited to 'publish.sh')
-rwxr-xr-xpublish.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/publish.sh b/publish.sh
new file mode 100755
index 0000000..9431d3e
--- /dev/null
+++ b/publish.sh
@@ -0,0 +1,35 @@
+#! /bin/bash
+
+tmp=$(mktemp -d)
+
+echo "$tmp"
+
+cp -r src "$tmp"/.
+cp -r LICENSE README.md "$tmp"/.
+
+### Publish the 2D version.
+sed 's#\.\./\.\./src#src#g' build/rapier2d/Cargo.toml > "$tmp"/Cargo.toml
+currdir=$(pwd)
+cd "$tmp" && cargo publish
+cd "$currdir" || exit
+
+
+### Publish the 3D version.
+sed 's#\.\./\.\./src#src#g' build/rapier3d/Cargo.toml > "$tmp"/Cargo.toml
+cp -r LICENSE README.md "$tmp"/.
+cd "$tmp" && cargo publish
+cd "$currdir" || exit
+
+### Publish the 2D f64 version.
+sed 's#\.\./\.\./src#src#g' build/rapier2d-f64/Cargo.toml > "$tmp"/Cargo.toml
+currdir=$(pwd)
+cd "$tmp" && cargo publish
+cd "$currdir" || exit
+
+
+### Publish the 3D f64 version.
+sed 's#\.\./\.\./src#src#g' build/rapier3d-f64/Cargo.toml > "$tmp"/Cargo.toml
+cp -r LICENSE README.md "$tmp"/.
+cd "$tmp" && cargo publish
+
+rm -rf "$tmp"