Files
topgrade/ci/before_deploy.sh

34 lines
715 B
Bash
Raw Normal View History

2018-06-04 22:41:08 +03:00
# This script takes care of building your crate and packaging it for release
set -ex
main() {
local src=$(pwd) \
stage=
2018-06-04 22:41:08 +03:00
case $TRAVIS_OS_NAME in
2018-06-04 22:41:08 +03:00
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 rustc --bin topgrade --target $TARGET --release --all-features -- -C lto
2018-06-04 22:41:08 +03:00
# TODO Update this to package the right artifacts
cp target/$TARGET/release/topgrade $stage/
2018-06-04 22:41:08 +03:00
cd $stage
tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *
cd $src
2018-06-04 22:41:08 +03:00
rm -rf $stage
2018-06-04 22:41:08 +03:00
}
main