1
0
Fork 0
mirror of https://github.com/lise-henry/crowbook synced 2024-05-04 10:56:04 +02:00
crowbook/ci/before_deploy.sh
2020-07-07 10:43:42 +02:00

34 lines
677 B
Bash

# This script takes care of building your crate and packaging it for release
set -ex
main() {
local src=$(pwd) \
stage=
case $TRAVIS_OS_NAME in
linux)
stage=$(mktemp -d)
;;
osx)
stage=$(mktemp -d -t tmp)
;;
esac
test -f Cargo.lock || cargo generate-lockfile
# TODO Update this to build the artifacts that matter to you
cross build --target $TARGET --release
# TODO Update this to package the right artifacts
cp target/$TARGET/release/crowbook* $stage/
cd $stage
tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *
cd $src
rm -rf $stage
}
main