summaryrefslogtreecommitdiffstats
path: root/ci/before_deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/before_deploy.sh')
-rwxr-xr-x[-rw-r--r--]ci/before_deploy.sh31
1 files changed, 15 insertions, 16 deletions
diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh
index 4890f96b..35bdc0b1 100644..100755
--- a/ci/before_deploy.sh
+++ b/ci/before_deploy.sh
@@ -1,40 +1,39 @@
-# `before_deploy` phase: here we package the build artifacts
+#!/bin/bash
+
+# package the build artifacts
set -ex
-. $(dirname $0)/utils.sh
+. "$(dirname $0)/utils.sh"
# Generate artifacts for release
mk_artifacts() {
if is_ssse3_target; then
RUSTFLAGS="-C target-feature=+ssse3" \
- cargo build --target $TARGET --release --features simd-accel
+ cargo build --target "$TARGET" --release --features simd-accel
else
- cargo build --target $TARGET --release
+ cargo build --target "$TARGET" --release
fi
}
mk_tarball() {
- # create a "staging" directory
- local td=$(mktempd)
- local out_dir=$(pwd)
- local name="${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}"
local gcc_prefix="$(gcc_prefix)"
- mkdir "${td:?}/${name}"
- mkdir "$td/$name/complete"
+ local td="$(mktemp -d)"
+ local name="${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}"
+ mkdir -p "$td/$name/complete"
+ mkdir deployment
+ local out_dir="$(pwd)/deployment"
cp target/$TARGET/release/rg "$td/$name/rg"
- ${gcc_prefix}strip "$td/$name/rg"
+ "${gcc_prefix}strip" "$td/$name/rg"
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} \
+ target/"$TARGET"/release/build/ripgrep-*/out/{rg.bash,rg.fish,_rg.ps1} \
"$td/$name/complete/"
cp complete/_rg "$td/$name/complete/"
- pushd $td
- tar czf "$out_dir/$name.tar.gz" *
- popd
- rm -r $td
+ (cd "$td" && tar czf "$out_dir/$name.tar.gz" *)
+ rm -rf "$td"
}
main() {