Make set -x more buildkite friendly

This commit is contained in:
Michael Vines 2018-09-07 09:08:08 -07:00
parent 506a81e8cc
commit 05decc863f
1 changed files with 6 additions and 2 deletions

View File

@ -1,11 +1,14 @@
#!/bin/bash -e
[[ -n "$CARGO_TARGET_CACHE_NAME" ]] || exit 0
# Ensure the pattern "+++ ..." never occurs when |set -x| is set, as buildkite
# interprets this as the start of a log group.
# Ref: https://buildkite.com/docs/pipelines/managing-log-output
export PS4="++"
#
# Restore target/ from the previous CI build on this machine
#
(
[[ -n "$CARGO_TARGET_CACHE_NAME" ]] || (
d=$HOME/cargo-target-cache/"$CARGO_TARGET_CACHE_NAME"
if [[ -d $d ]]; then
@ -21,3 +24,4 @@
set -x
rsync -a --delete --link-dest="$d" "$d"/target .
)