1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2024-12-12 19:18:24 +02:00
ripgrep/ci/before_deploy.sh

41 lines
909 B
Bash
Raw Normal View History

2016-09-06 02:08:46 +02:00
# `before_deploy` phase: here we package the build artifacts
set -ex
. $(dirname $0)/utils.sh
# Generate artifacts for release
mk_artifacts() {
RUSTFLAGS="-C target-feature=+ssse3" \
cargo build --target $TARGET --release --features simd-accel
2016-09-06 02:08:46 +02:00
}
mk_tarball() {
# create a "staging" directory
local td=$(mktempd)
local out_dir=$(pwd)
local name="${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}"
mkdir "$td/$name"
2016-12-07 17:32:24 +02:00
mkdir "$td/$name/complete"
2016-09-06 02:08:46 +02:00
cp target/$TARGET/release/rg "$td/$name/rg"
strip "$td/$name/rg"
2016-09-23 01:20:06 +02:00
cp {doc/rg.1,README.md,UNLICENSE,COPYING,LICENSE-MIT} "$td/$name/"
cp \
target/$TARGET/release/build/ripgrep-*/out/{rg.bash-completion,rg.fish,_rg.ps1} \
"$td/$name/complete/"
2017-05-29 22:02:09 +02:00
cp complete/_rg "$td/$name/complete/"
2016-09-06 02:08:46 +02:00
pushd $td
tar czf "$out_dir/$name.tar.gz" *
2016-09-06 02:08:46 +02:00
popd
rm -r $td
}
main() {
mk_artifacts
mk_tarball
}
main