File tree Expand file tree Collapse file tree 3 files changed +23
-15
lines changed Expand file tree Collapse file tree 3 files changed +23
-15
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- master
7
- pull_request : {}
7
+ pull_request : { }
8
8
9
9
jobs :
10
10
test :
35
35
strategy :
36
36
fail-fast : false
37
37
matrix :
38
- channel : [stable, beta, nightly]
38
+ channel : [ stable, beta, nightly ]
39
39
40
40
steps :
41
41
- name : Clone the source code
@@ -66,12 +66,12 @@ jobs:
66
66
runs-on : ubuntu-latest
67
67
68
68
env :
69
- PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION : 99.0.0
69
+ RUSTUP_OVERRIDE_VERSION : 99.0.0
70
70
71
71
strategy :
72
72
fail-fast : false
73
73
matrix :
74
- channel : [stable, beta]
74
+ channel : [ stable, beta ]
75
75
76
76
steps :
77
77
- name : Clone the source code
91
91
env :
92
92
RUSTUP_UPDATE_ROOT : http://localhost:9000/static/rustup
93
93
94
+ - name : Verify Rustup version
95
+ run : rustup --version | grep -q ${{ env.RUSTUP_OVERRIDE_VERSION }}
96
+
94
97
docker :
95
98
name : Build Docker image
96
99
runs-on : ubuntu-latest
@@ -120,7 +123,7 @@ jobs:
120
123
permissions :
121
124
id-token : write
122
125
123
- needs : [test, release, rustup, docker]
126
+ needs : [ test, release, rustup, docker ]
124
127
if : github.event_name == 'push' && github.repository == 'rust-lang/promote-release' && github.ref == 'refs/heads/master'
125
128
126
129
steps :
Original file line number Diff line number Diff line change 42
42
fi
43
43
44
44
for target in " ${DOWNLOAD_TARGETS[@]} " ; do
45
- if ! mc stat " local/artifacts/builds/${commit} /dist/${target} " > /dev/null 2>&1 ; then
46
- echo " ==> copying ${target} from S3"
45
+ if ! mc stat " local/artifacts/builds/${commit} /dist/${target} " > /dev/null 2>&1 ; then
46
+ echo " ==> copying ${target} from S3"
47
47
48
48
for file in " ${DOWNLOAD_FILES[@]} " ; do
49
49
if curl -Lo /tmp/component " ${DOWNLOAD_BASE} /${commit} /dist/${target} /${file} " --fail; then
@@ -94,5 +94,10 @@ if [[ "${override_commit}" != "" ]]; then
94
94
export PROMOTE_RELEASE_OVERRIDE_COMMIT=" ${override_commit} "
95
95
fi
96
96
97
+ # Conditionally set a version for the next Rustup release
98
+ if [[ " ${RUSTUP_OVERRIDE_VERSION:- } " != " " ]]; then
99
+ export PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION=" ${RUSTUP_OVERRIDE_VERSION} "
100
+ fi
101
+
97
102
echo " ==> starting promote-release"
98
103
/src/target/release/promote-release /persistent/release " ${channel} "
Original file line number Diff line number Diff line change 5
5
set -euo pipefail
6
6
IFS=$' \n\t '
7
7
8
- PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION= " "
8
+ RUSTUP_OVERRIDE_VERSION= " ${RUSTUP_OVERRIDE_VERSION :- } "
9
9
10
10
if [[ " $# " -lt 1 ]]; then
11
11
echo " Usage: $0 <release|rustup>"
@@ -50,11 +50,11 @@ if [[ "$(uname)" == "Linux" ]]; then
50
50
cargo build --release
51
51
fi
52
52
53
- # If the PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION environment variable is set,
54
- # forward it to the Docker environment.
55
- if [[ " $PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION " != " " ]]; then
56
- docker compose exec -e " PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION=${PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION} " -T local " /src/local/${command} .sh" " ${channel} " " ${override_commit} "
53
+ if [[ " $RUSTUP_OVERRIDE_VERSION " != " " ]]; then
54
+ # If the RUSTUP_OVERRIDE_VERSION environment variable is set, forward it to the Docker environment.
55
+ echo " ==> running local release with override version ${RUSTUP_OVERRIDE_VERSION} "
56
+ docker compose exec -e " RUSTUP_OVERRIDE_VERSION=${RUSTUP_OVERRIDE_VERSION} " -T local " /src/local/${command} .sh" " ${channel} " " ${override_commit} "
57
+ else
58
+ # Run the command inside the docker environment.
59
+ docker compose exec -T local " /src/local/${command} .sh" " ${channel} " " ${override_commit} "
57
60
fi
58
-
59
- # Run the command inside the docker environment.
60
- docker compose exec -T local " /src/local/${command} .sh" " ${channel} " " ${override_commit} "
You can’t perform that action at this time.
0 commit comments