From 254eef6a2aadcde17644648502dcd241a2452c2b Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sun, 20 Dec 2020 12:12:40 +0900 Subject: [PATCH] Add prebuild script --- script/prebuild.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 script/prebuild.sh diff --git a/script/prebuild.sh b/script/prebuild.sh new file mode 100755 index 00000000..4b020d82 --- /dev/null +++ b/script/prebuild.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -euo pipefail + +version="$1" +repo="$2" +builddir="$3" +pkg="$4" + +build () { + features="$1" + cargo clean + cargo web deploy -p plume-front --release + 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