File tree 3 files changed +10
-6
lines changed
3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ mkdir "$CACHE_DIR"
31
31
32
32
# On the beta channel we'll be automatically calculating the prerelease version
33
33
# 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
35
35
git fetch origin --unshallow beta master
36
36
fi
37
37
Original file line number Diff line number Diff line change 65
65
# Always set the release channel for bootstrap; this is normally not important (i.e., only dist
66
66
# builds would seem to matter) but in practice bootstrap wants to know whether we're targeting
67
67
# 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)
73
69
RUST_CONFIGURE_ARGS=" $RUST_CONFIGURE_ARGS --release-channel=$RUST_RELEASE_CHANNEL "
74
70
75
71
if [ " $DEPLOY$DEPLOY_ALT " = " 1" ]; then
Original file line number Diff line number Diff line change @@ -141,3 +141,11 @@ function ciCommandSetEnv {
141
141
exit 1
142
142
fi
143
143
}
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
+ }
You can’t perform that action at this time.
0 commit comments