From d23cec95f066951f106c714fa6a7955f5eccd16f Mon Sep 17 00:00:00 2001 From: Peter Hale Date: Tue, 26 Oct 2021 08:59:34 -0600 Subject: [PATCH 1/4] fix: remove deb as a platform and remove required for platform @W-10008913@ --- src/commands/channel/promote.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/commands/channel/promote.ts b/src/commands/channel/promote.ts index 75e8c9ab..d27ddaab 100644 --- a/src/commands/channel/promote.ts +++ b/src/commands/channel/promote.ts @@ -8,7 +8,7 @@ import * as os from 'os'; import { flags, FlagsConfig, SfdxCommand } from '@salesforce/command'; import { Messages, SfdxError } from '@salesforce/core'; -import { AnyJson, ensureArray, ensureNumber, ensureString } from '@salesforce/ts-types'; +import { AnyJson, asArray, ensureArray, ensureNumber, ensureString } from '@salesforce/ts-types'; import { ShellString } from 'shelljs'; import { bold } from 'chalk'; import { isMonoRepo } from '../../repository'; @@ -45,8 +45,7 @@ export default class Promote extends SfdxCommand { platform: flags.array({ char: 'p', description: messages.getMessage('platform'), - required: true, - options: ['win', 'macos', 'deb'], + options: ['win', 'macos'], multiple: true, }), cli: flags.enum({ @@ -115,7 +114,7 @@ export default class Promote extends SfdxCommand { const targets = this.flags.targets ? (['--targets', ...ensureArray(this.flags.targets)] as string[]) : []; const { sha, version } = await this.determineShaAndVersion(cli); - const platforms = ensureArray(this.flags.platform).map((p: string) => `--${p}`); + const platforms = asArray(this.flags.platform, []).map((p: string) => `--${p}`); if (!this.flags.dryrun) { const oclifPlugin = await PluginCommand.create({ From 1ce99f1948a8edb443a8098a37585099df60fac5 Mon Sep 17 00:00:00 2001 From: Peter Hale Date: Tue, 26 Oct 2021 09:16:29 -0600 Subject: [PATCH 2/4] fix: remove deb as a platform and remove required for platform @W-10008913@ --- src/commands/channel/promote.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/channel/promote.ts b/src/commands/channel/promote.ts index d27ddaab..d1452399 100644 --- a/src/commands/channel/promote.ts +++ b/src/commands/channel/promote.ts @@ -8,7 +8,7 @@ import * as os from 'os'; import { flags, FlagsConfig, SfdxCommand } from '@salesforce/command'; import { Messages, SfdxError } from '@salesforce/core'; -import { AnyJson, asArray, ensureArray, ensureNumber, ensureString } from '@salesforce/ts-types'; +import { AnyJson, ensureArray, ensureNumber, ensureString } from '@salesforce/ts-types'; import { ShellString } from 'shelljs'; import { bold } from 'chalk'; import { isMonoRepo } from '../../repository'; @@ -45,7 +45,8 @@ export default class Promote extends SfdxCommand { platform: flags.array({ char: 'p', description: messages.getMessage('platform'), - options: ['win', 'macos'], + options: ['win', 'macos', 'deb'], + default: [], multiple: true, }), cli: flags.enum({ From ce1f2895e582fd4726ceff2d0dfdfcc9cec5a365 Mon Sep 17 00:00:00 2001 From: Peter Hale Date: Tue, 26 Oct 2021 09:16:51 -0600 Subject: [PATCH 3/4] fix: remove deb as a platform and remove required for platform @W-10008913@ --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 39d28d3c..bacfb77b 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,6 @@ }, "husky": { "hooks": { - "pre-commit": "sf-husky-pre-commit", "commit-msg": "sf-husky-commit-msg", "pre-push": "sf-husky-pre-push" } From 86f5af799657ee3303a0883609adf5ba5d2186ab Mon Sep 17 00:00:00 2001 From: Peter Hale Date: Tue, 26 Oct 2021 09:19:14 -0600 Subject: [PATCH 4/4] chore: leave deb in platform --- package.json | 1 + src/commands/channel/promote.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index bacfb77b..39d28d3c 100644 --- a/package.json +++ b/package.json @@ -192,6 +192,7 @@ }, "husky": { "hooks": { + "pre-commit": "sf-husky-pre-commit", "commit-msg": "sf-husky-commit-msg", "pre-push": "sf-husky-pre-push" } diff --git a/src/commands/channel/promote.ts b/src/commands/channel/promote.ts index d1452399..ef9262bb 100644 --- a/src/commands/channel/promote.ts +++ b/src/commands/channel/promote.ts @@ -8,7 +8,7 @@ import * as os from 'os'; import { flags, FlagsConfig, SfdxCommand } from '@salesforce/command'; import { Messages, SfdxError } from '@salesforce/core'; -import { AnyJson, ensureArray, ensureNumber, ensureString } from '@salesforce/ts-types'; +import { AnyJson, ensureArray, ensureNumber, ensureString, asArray } from '@salesforce/ts-types'; import { ShellString } from 'shelljs'; import { bold } from 'chalk'; import { isMonoRepo } from '../../repository';