1
0
mirror of https://github.com/lise-henry/crowbook synced 2024-09-21 16:33:07 +02:00
crowbook/ci/before_deploy.sh

34 lines
694 B
Bash
Raw Normal View History

# This script takes care of building your crate and packaging it for release
2016-02-23 14:57:10 +01:00
set -ex
main() {
local src=$(pwd) \
stage=
2016-02-23 14:57:10 +01:00
case $TRAVIS_OS_NAME in
linux)
stage=$(mktemp -d)
;;
osx)
stage=$(mktemp -d -t tmp)
;;
esac
2016-02-23 14:57:10 +01:00
test -f Cargo.lock || cargo generate-lockfile
2016-02-23 14:57:10 +01:00
# TODO Update this to build the artifacts that matter to you
cross rustc --bin hello --target $TARGET --release -- -C lto
2016-02-23 14:57:10 +01:00
# TODO Update this to package the right artifacts
cp target/$TARGET/release/hello $stage/
2016-02-23 14:57:10 +01:00
cd $stage
2017-10-11 02:27:59 +02:00
tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *
cd $src
2016-02-23 14:57:10 +01:00
rm -rf $stage
}
2016-02-23 14:57:10 +01:00
main