Skip to content

Commit

Permalink
Update before_deploy.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Relrin authored Aug 23, 2019
1 parent 2b03010 commit 040bbff
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions ci/before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ set -ex

main() {
local src=$(pwd) \
stage=
artefact = terraform-sage.exe
stage= \

case $TRAVIS_OS_NAME in
linux)
Expand All @@ -15,11 +16,25 @@ main() {
;;
esac

test -f Cargo.lock || cargo generate-lockfile
case $TARGET in
x86_64-pc-windows-gnu)
artefact=terraform-sage.exe
;;
x86_64-unknown-linux-gnu)
artefact=terraform-sage
;;
x86_64-unknown-linux-musl)
artefact=terraform-sage
;;
x86_64-apple-darwin)
artefact=terraform-sage
;;
esac

cross rustc --bin terraform-sage --target $TARGET --release -- -C lto
test -f Cargo.lock || cargo generate-lockfile

cp target/$TARGET/release/terraform-sage $stage/
cross rustc --bin $artefact --target $TARGET --release -- -C lto
cp target/$TARGET/release/$artefact $stage/

cd $stage
tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *
Expand Down

0 comments on commit 040bbff

Please sign in to comment.