@@ -186,42 +186,20 @@ if not ${env_file}
186
186
exit 1
187
187
end
188
188
189
- needs_run = exec cargo make --loglevel error check-needs-force-nightly-ci
190
-
191
- if eq ${needs_run} "yes"
192
- echo "Setting up CI environment for forced-nightly Rust build"
193
- appendfile ${env_file} "ICU4X_NIGHTLY_TOOLCHAIN=nightly\n"
194
- appendfile ${env_file} "INSTALLED_NIGHTLY_VERSION=nightly\n"
195
- appendfile ${env_file} "ICU4X_BUILDING_WITH_FORCED_NIGHTLY=1\n"
196
- appendfile ${env_file} "RUSTDOCFLAGS=--cfg ICU4X_BUILDING_WITH_FORCED_NIGHTLY\n"
197
- exec rustup override set nightly
198
- else
199
- echo "forced-nightly environment not required"
200
- end
201
- '''
202
-
203
- [tasks .check-needs-force-nightly-ci ]
204
- description = " Check if CI has requested a forced nightly"
205
- category = " CI"
206
- script_runner = " @duckscript"
207
- script = '''
208
- exit_on_error true
209
-
210
189
event_name = get_env GITHUB_EVENT_NAME
211
190
212
191
if not ${event_name}
213
192
echo "GITHUB_EVENT_NAME not set!"
214
193
exit 1
215
194
end
216
195
217
- is_schedule = eq ${event_name} "schedule"
218
- is_pr = eq ${event_name} "pull_request"
219
- is_dispatch = eq ${event_name} "workflow_dispatch"
196
+ is_schedule = eq " ${event_name}" "schedule"
197
+ is_pr = eq " ${event_name}" "pull_request"
198
+ is_dispatch = eq " ${event_name}" "workflow_dispatch"
220
199
dispatch_needs_nightly = set false
221
200
222
201
if is_dispatch
223
202
event_path = get_env GITHUB_EVENT_PATH
224
- echo ${event_path}
225
203
event_file = readfile ${event_path}
226
204
event_json = json_parse ${event_file}
227
205
if ${event_json.inputs.nightly}
@@ -230,6 +208,13 @@ if is_dispatch
230
208
end
231
209
232
210
if ${is_schedule} or ${is_pr} or ${dispatch_needs_nightly}
233
- echo "yes"
211
+ echo "Setting up CI environment for forced-nightly Rust build"
212
+ appendfile ${env_file} "ICU4X_NIGHTLY_TOOLCHAIN=nightly\n"
213
+ appendfile ${env_file} "INSTALLED_NIGHTLY_VERSION=nightly\n"
214
+ appendfile ${env_file} "ICU4X_BUILDING_WITH_FORCED_NIGHTLY=1\n"
215
+ appendfile ${env_file} "RUSTDOCFLAGS=--cfg ICU4X_BUILDING_WITH_FORCED_NIGHTLY\n"
216
+ exec rustup override set nightly
217
+ else
218
+ echo "forced-nightly environment not required"
234
219
end
235
- '''
220
+ '''
0 commit comments