build: Add dist script

This script will vendor the Rust dependencies
of the app so that our tarballs can be built
offline.
This commit is contained in:
Christopher Davis 2023-04-02 17:45:51 -04:00 • committed by Sophie Herold
parent 533158bb69
commit 2e237d41e8
2 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,9 @@
#!/bin/sh
export DIST="$1"
export SOURCE_ROOT="$2"
cd "$SOURCE_ROOT"
mkdir "$DIST"/.cargo
cargo vendor | sed 's/^directory = ".*"/directory = "vendor"/g' > $DIST/.cargo/config
# Move vendor into dist tarball directory
mv vendor "$DIST"