diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-06-19 10:08:13 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-06-20 16:20:08 -0400 |
| commit | 61b453cd1ab28b0dabab3293ee12df7474516eb6 (patch) | |
| tree | 26e585a359a22c39c9db1ac9be8f84a40ac505ba | |
| parent | 39260f6d4994db191f2fca9f12b4930eb3a3c122 (diff) | |
| download | rust-61b453cd1ab28b0dabab3293ee12df7474516eb6.tar.gz rust-61b453cd1ab28b0dabab3293ee12df7474516eb6.zip | |
Fix CI to fetch master on beta channel
| -rwxr-xr-x | src/ci/init_repo.sh | 2 | ||||
| -rwxr-xr-x | src/ci/run.sh | 6 | ||||
| -rw-r--r-- | src/ci/shared.sh | 8 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/ci/init_repo.sh b/src/ci/init_repo.sh index 060b3079dad..3c61dcc9d9c 100755 --- a/src/ci/init_repo.sh +++ b/src/ci/init_repo.sh @@ -31,7 +31,7 @@ mkdir "$CACHE_DIR" # On the beta channel we'll be automatically calculating the prerelease version # via the git history, so unshallow our shallow clone from CI. -if grep -q RUST_RELEASE_CHANNEL=beta src/ci/run.sh; then +if [ "$(releaseChannel)" = "beta" ]; then git fetch origin --unshallow beta master fi diff --git a/src/ci/run.sh b/src/ci/run.sh index c5e225c7cd1..b5019d83af4 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -65,11 +65,7 @@ fi # Always set the release channel for bootstrap; this is normally not important (i.e., only dist # builds would seem to matter) but in practice bootstrap wants to know whether we're targeting # master, beta, or stable with a build to determine whether to run some checks (notably toolstate). -if [[ -z "${RUST_CI_OVERRIDE_RELEASE_CHANNEL+x}" ]]; then - export RUST_RELEASE_CHANNEL="$(cat "${ci_dir}/channel")" -else - export RUST_RELEASE_CHANNEL="${RUST_CI_OVERRIDE_RELEASE_CHANNEL}" -fi +export RUST_RELEASE_CHANNEL=$(releaseChannel) RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --release-channel=$RUST_RELEASE_CHANNEL" if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then diff --git a/src/ci/shared.sh b/src/ci/shared.sh index 332a949a4dc..b095afb542d 100644 --- a/src/ci/shared.sh +++ b/src/ci/shared.sh @@ -141,3 +141,11 @@ function ciCommandSetEnv { exit 1 fi } + +function releaseChannel { + if [[ -z "${RUST_CI_OVERRIDE_RELEASE_CHANNEL+x}" ]]; then + cat "${ci_dir}/channel" + else + echo $RUST_CI_OVERRIDE_RELEASE_CHANNEL + fi +} |
