Support vendored builds

This commit is contained in:
Michael Aaron Murphy 2018-11-29 23:24:46 +00:00
parent f24510c078
commit f7b9de5d24

View File

@ -1,4 +1,6 @@
#!/bin/sh
#!/bin/bash
set -ex
export CARGO_HOME=$1/target/cargo-home
export LOCALEDIR="$3"
@ -6,11 +8,16 @@ export APP_ID="$4"
export VERSION="$5"
export PROFILE="$6"
if test "$PROFILE" = "Devel"
then
echo "DEBUG MODE"
cargo build -p podcasts-gtk && cp $1/target/debug/podcasts-gtk $2
else
ARGS=()
if test "$PROFILE" != "Devel"; then
echo "RELEASE MODE"
cargo build --release -p podcasts-gtk && cp $1/target/release/podcasts-gtk $2
fi
ARGS+=('--release')
fi
if test -d vendor; then
echo "VENDORED"
ARGS+=('--frozen')
fi
cargo build ${ARGS[@]} -p podcasts-gtk && cp $1/target/release/podcasts-gtk $2