solana/.buildkite/hooks/pre-command

25 lines
683 B
Plaintext
Raw Normal View History

2018-12-15 13:49:22 -08:00
#!/usr/bin/env bash
set -e
2018-09-07 09:08:08 -07:00
# 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
#
eval "$(ci/channel-info.sh)"
eval "$(ci/sbf-tools-info.sh)"
source "ci/rust-version.sh"
HOST_RUST_VERSION="$rust_stable"
pattern='^[0-9]+\.[0-9]+\.[0-9]+$'
if [[ ${HOST_RUST_VERSION} =~ ${pattern} ]]; then
HOST_RUST_VERSION="${rust_stable%.*}"
2023-03-09 03:29:27 -08:00
fi
export SBF_TOOLS_VERSION
SCCACHE_S3_KEY_PREFIX="${rust_stable}_${rust_nightly}_${SBF_TOOLS_VERSION}"
export SCCACHE_S3_KEY_PREFIX