Plume/script/prebuild.sh

26 lines
608 B
Bash
Raw Normal View History

2020-12-20 03:12:40 +00:00
#!/bin/bash
set -euo pipefail
version="$1"
repo="$2"
builddir="$3"
pkg="$4"
build () {
features="$1"
cargo clean
RUSTFLAGS="--cfg=web_sys_unstable_apis" wasm-pack build --target web --release plume-front
2020-12-20 03:12:40 +00:00
cargo build --release --no-default-features --features="${features}" --package=plume-cli
cargo build --release --no-default-features --features="${features}"
./script/generate_artifact.sh
}
git clone $repo $builddir
cd $builddir
git checkout $version
mkdir -p $pkg
build postgres
mv plume.tar.gz /pkg/plume-postgres.tar.gz
build sqlite
mv plume.tar.gz /pkg/plume-sqlite.tar.gz