From 27b13e4826fb7fcd93b1a298103e06ef03f4dd17 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Tue, 2 Feb 2021 21:30:37 -0600 Subject: [PATCH] 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.) --- scripts/release/download-experimental-build.js | 7 +------ scripts/release/shared-commands/parse-params.js | 8 ++------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/scripts/release/download-experimental-build.js b/scripts/release/download-experimental-build.js index 2de19359559aa..2bd77a67d1221 100755 --- a/scripts/release/download-experimental-build.js +++ b/scripts/release/download-experimental-build.js @@ -11,18 +11,13 @@ const { const checkEnvironmentVariables = require('./shared-commands/check-environment-variables'); const downloadBuildArtifacts = require('./shared-commands/download-build-artifacts'); -const getLatestMasterBuildNumber = require('./shared-commands/get-latest-master-build-number'); const parseParams = require('./shared-commands/parse-params'); const printSummary = require('./download-experimental-build-commands/print-summary'); const run = async () => { try { addDefaultParamValue('-r', '--releaseChannel', 'experimental'); - addDefaultParamValue( - null, - '--build', - await getLatestMasterBuildNumber(true) - ); + addDefaultParamValue(null, '--commit', 'master'); const params = await parseParams(); params.cwd = join(__dirname, '..', '..'); diff --git a/scripts/release/shared-commands/parse-params.js b/scripts/release/shared-commands/parse-params.js index 5755a8ee65879..9af398cbc852c 100644 --- a/scripts/release/shared-commands/parse-params.js +++ b/scripts/release/shared-commands/parse-params.js @@ -38,12 +38,8 @@ module.exports = async () => { const params = commandLineArgs(paramDefinitions); if (params.build !== null) { - if (params.commit !== null) { - console.error( - '`build` and `commmit` params are mutually exclusive. Choose one or the other.`' - ); - process.exit(1); - } + // TODO: Should we just remove the `build` param? Seems like `commit` is a + // sufficient replacement. } else { if (params.commit === null) { console.error('Must provide either `build` or `commit`.');