mdBook/ci/before_deploy.sh

30 lines
518 B
Bash
Raw Normal View History

# This script takes care of building your crate and packaging it for release
set -ex
main() {
local src=$(pwd) \
stage=
2018-04-07 06:27:58 +08:00
case $TRAVIS_OS_NAME in
linux)
stage=$(mktemp -d)
;;
osx)
stage=$(mktemp -d -t tmp)
;;
esac
2018-04-07 06:15:26 +08:00
cargo rustc --bin mdbook --target $TARGET --release -- -C lto
2018-04-07 06:15:26 +08:00
cp target/release/mdbook $stage/
cd $stage
tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *
cd $src
rm -rf $stage
}
2018-04-07 06:15:26 +08:00
main