Skip to content

Commit 0e526bc

Browse files
authored
Fix release script --commit param (#20720)
PR #20717 accidentally broke the `--commit` parameter because the script errors if you provide both a `--build` and a `--commit`. I solved by removing the validation error. When there's a conflict, it will choose the --`build`. (Although maybe we should `--build` entirely and always uses `--commit`. I think `--commit` is a sufficient replacement.)
1 parent 7e36d8b commit 0e526bc

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

scripts/release/download-experimental-build.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,13 @@ const {
1111

1212
const checkEnvironmentVariables = require('./shared-commands/check-environment-variables');
1313
const downloadBuildArtifacts = require('./shared-commands/download-build-artifacts');
14-
const getLatestMasterBuildNumber = require('./shared-commands/get-latest-master-build-number');
1514
const parseParams = require('./shared-commands/parse-params');
1615
const printSummary = require('./download-experimental-build-commands/print-summary');
1716

1817
const run = async () => {
1918
try {
2019
addDefaultParamValue('-r', '--releaseChannel', 'experimental');
21-
addDefaultParamValue(
22-
null,
23-
'--build',
24-
await getLatestMasterBuildNumber(true)
25-
);
20+
addDefaultParamValue(null, '--commit', 'master');
2621

2722
const params = await parseParams();
2823
params.cwd = join(__dirname, '..', '..');

scripts/release/shared-commands/parse-params.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,8 @@ module.exports = async () => {
3838
const params = commandLineArgs(paramDefinitions);
3939

4040
if (params.build !== null) {
41-
if (params.commit !== null) {
42-
console.error(
43-
'`build` and `commmit` params are mutually exclusive. Choose one or the other.`'
44-
);
45-
process.exit(1);
46-
}
41+
// TODO: Should we just remove the `build` param? Seems like `commit` is a
42+
// sufficient replacement.
4743
} else {
4844
if (params.commit === null) {
4945
console.error('Must provide either `build` or `commit`.');

0 commit comments

Comments
 (0)