watchexec/ci/before_deploy.sh

19 lines
435 B
Bash
Raw Normal View History

2018-08-21 06:28:42 +02:00
#!/usr/bin/env bash
2016-10-14 04:09:34 +02:00
# Build script shamelessly stolen from ripgrep :)
cargo build --target $TARGET --release
build_dir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp)
out_dir=$(pwd)
name="${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}"
mkdir "$build_dir/$name"
cp target/$TARGET/release/watchexec "$build_dir/$name/"
cp {doc/watchexec.1,LICENSE} "$build_dir/$name/"
2016-10-14 04:09:34 +02:00
pushd $build_dir
2018-08-21 06:28:42 +02:00
tar cvf "$out_dir/$name.tar" *
2016-10-14 04:09:34 +02:00
popd
2018-08-21 06:28:42 +02:00
gzip -f9 "$name.tar"