Skip to content

Commit

Permalink
Add publish.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
Jondolf committed Jun 19, 2023
1 parent 6120be6 commit 21901b9
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#! /bin/bash

tmp=$(mktemp -d)

echo "$tmp"
currdir=$(pwd)

cp -r src "$tmp"/.
cp -r LICENSE-MIT LICENSE-APACHE README.md "$tmp"/.

### Publish bevy_xpbd_2d
sed 's#\.\./\.\./src#src#g' crates/bevy_xpbd_2d/Cargo.toml > "$tmp"/Cargo.toml
cp -r crates/bevy_xpbd_2d/examples "$tmp"/.
cd "$tmp" && cargo publish --dry-run

### Remove the 2D examples and return to previous directory
rm -rf examples
cd "$currdir" || exit

### Publish bevy_xpbd_3d
sed 's#\.\./\.\./src#src#g' crates/bevy_xpbd_3d/Cargo.toml > "$tmp"/Cargo.toml
cp -r crates/bevy_xpbd_3d/examples "$tmp"/.
cd "$tmp" && cargo publish --dry-run

rm -rf "$tmp"

0 comments on commit 21901b9

Please sign in to comment.