Files
solana/.travis/channel_restriction.sh

20 lines
341 B
Bash
Raw Permalink Normal View History

2020-09-30 11:24:00 -06:00
#!/usr/bin/env bash
#
2020-10-04 10:18:42 -06:00
# Only proceed if we are on one of the channels passed in, or a tag build
2020-09-30 11:24:00 -06:00
#
set -ex
2020-10-04 10:18:42 -06:00
[[ -n $CI_TAG ]] && exit 0
2020-09-30 11:24:00 -06:00
eval "$(ci/channel-info.sh)"
for acceptable_channel in "$@"; do
if [[ "$CHANNEL" == "$acceptable_channel" ]]; then
exit 0
fi
done
echo "Not running from one of the following channels: $*"
exit 1