Skip to content

Commit 9c664b2

Browse files
authored
Rollup merge of #86472 - Mark-Simulacrum:fix-ci-beta, r=pietroalbini
Fix CI to fetch master on beta channel This forward-ports a fix from the beta channel (landing in #86413, hopefully) to master so that we don't need to apply it on each round of backports. This bug also demonstrates that our channel-checking is a bit insufficient -- stable is checked, but beta has some of its own peculiarities currently and isn't checked. But this does not attempt to adjust for that; we likely can't afford to run both beta and stable channels by CI and the current state here seems OK for now. r? `@pietroalbini`
2 parents a81f55f + 61b453c commit 9c664b2

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/ci/init_repo.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ mkdir "$CACHE_DIR"
3131

3232
# On the beta channel we'll be automatically calculating the prerelease version
3333
# via the git history, so unshallow our shallow clone from CI.
34-
if grep -q RUST_RELEASE_CHANNEL=beta src/ci/run.sh; then
34+
if [ "$(releaseChannel)" = "beta" ]; then
3535
git fetch origin --unshallow beta master
3636
fi
3737

src/ci/run.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@ fi
6565
# Always set the release channel for bootstrap; this is normally not important (i.e., only dist
6666
# builds would seem to matter) but in practice bootstrap wants to know whether we're targeting
6767
# master, beta, or stable with a build to determine whether to run some checks (notably toolstate).
68-
if [[ -z "${RUST_CI_OVERRIDE_RELEASE_CHANNEL+x}" ]]; then
69-
export RUST_RELEASE_CHANNEL="$(cat "${ci_dir}/channel")"
70-
else
71-
export RUST_RELEASE_CHANNEL="${RUST_CI_OVERRIDE_RELEASE_CHANNEL}"
72-
fi
68+
export RUST_RELEASE_CHANNEL=$(releaseChannel)
7369
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --release-channel=$RUST_RELEASE_CHANNEL"
7470

7571
if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then

src/ci/shared.sh

+8
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,11 @@ function ciCommandSetEnv {
141141
exit 1
142142
fi
143143
}
144+
145+
function releaseChannel {
146+
if [[ -z "${RUST_CI_OVERRIDE_RELEASE_CHANNEL+x}" ]]; then
147+
cat "${ci_dir}/channel"
148+
else
149+
echo $RUST_CI_OVERRIDE_RELEASE_CHANNEL
150+
fi
151+
}

0 commit comments

Comments
 (0)