Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f9cdc6176 | |||
| f6bd5cc079 |
1 changed files with 6 additions and 2 deletions
8
build.sh
8
build.sh
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
printenv
|
||||||
|
|
||||||
# strip https:// from the urls
|
# strip https:// from the urls
|
||||||
if ! [[ "$SRC_REPOSITORY" =~ ^https:// ]]; then
|
if ! [[ "$SRC_REPOSITORY" =~ ^https:// ]]; then
|
||||||
echo "Only https git urls are supported now. Provided source git url: $SRC_REPOSITORY"
|
echo "Only https git urls are supported now. Provided source git url: $SRC_REPOSITORY"
|
||||||
|
|
@ -45,7 +47,10 @@ ARGS='--target x86_64-unknown-linux-musl'
|
||||||
RUSTFLAGS=''
|
RUSTFLAGS=''
|
||||||
TARGET_DIR="./target/$(rustc --print host-tuple)"
|
TARGET_DIR="./target/$(rustc --print host-tuple)"
|
||||||
|
|
||||||
if [[ "$OPT_RELEASE" != "true" ]] && [[ "$OPT_RELEASE" != "True" ]]; then
|
if [[ "$OPT_RELEASE" == "true" ]] || [[ "$OPT_RELEASE" == "True" ]]; then
|
||||||
|
TARGET_DIR="$TARGET_DIR/release"
|
||||||
|
ARGS="$ARGS --release"
|
||||||
|
else
|
||||||
TARGET_DIR="$TARGET_DIR/debug"
|
TARGET_DIR="$TARGET_DIR/debug"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -53,7 +58,6 @@ if [[ "$OPT_BUILD_STD" == "true" ]] || [[ "$OPT_BUILD_STD" == "True" ]]; then
|
||||||
RUSTFLAGS="$RUSTFLAGS -Lunwind -L/lib/musl/lib -Lcrt -Lxz -llzma"
|
RUSTFLAGS="$RUSTFLAGS -Lunwind -L/lib/musl/lib -Lcrt -Lxz -llzma"
|
||||||
TOOLCHAIN='+nightly'
|
TOOLCHAIN='+nightly'
|
||||||
ARGS="-Z build-std $ARGS"
|
ARGS="-Z build-std $ARGS"
|
||||||
TARGET_DIR="$TARGET_DIR/release"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RUSTFLAGS=$RUSTFLAGS cargo $TOOLCHAIN b $ARGS -v
|
RUSTFLAGS=$RUSTFLAGS cargo $TOOLCHAIN b $ARGS -v
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue