]> git.lizzy.rs Git - rust.git/blob - src/ci/scripts/should-skip-this.sh
Rollup merge of #107779 - compiler-errors:issue-107775, r=jackh726
[rust.git] / src / ci / scripts / should-skip-this.sh
1 #!/bin/bash
2 # Set the SKIP_JOB environment variable if this job is not supposed to run on the current builder.
3
4 set -euo pipefail
5 IFS=$'\n\t'
6
7 source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
8
9 if [[ -n "${CI_ONLY_WHEN_CHANNEL-}" ]]; then
10     if [[ "${CI_ONLY_WHEN_CHANNEL}" = "$(cat src/ci/channel)" ]]; then
11         echo "The channel is the expected one"
12     else
13         echo "Not executing this job as the channel is not the expected one"
14         ciCommandSetEnv SKIP_JOB 1
15         exit 0
16     fi
17 fi
18
19
20 echo "Executing the job since there is no skip rule preventing the execution"
21 exit 0