You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
573B

  1. # This script takes care of building your crate and packaging it for release
  2. set -ex
  3. main() {
  4. local src=$(pwd) \
  5. stage=
  6. case $TRAVIS_OS_NAME in
  7. linux)
  8. stage=$(mktemp -d)
  9. ;;
  10. osx)
  11. stage=$(mktemp -d -t tmp)
  12. ;;
  13. esac
  14. test -f Cargo.lock || cargo generate-lockfile
  15. cross rustc --bin zola --target $TARGET --release -- -C lto
  16. cp target/$TARGET/release/zola $stage/
  17. cd $stage
  18. tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *
  19. cd $src
  20. rm -rf $stage
  21. }
  22. main