Skip to content

Commit 0451aa6

Browse files
committed
feat: adding new patch version conversion parameter
1 parent 0635794 commit 0451aa6

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

command-snapshot.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@
6565
"installationkey",
6666
"installationkeybypass",
6767
"target-hub-org",
68-
"targetdevhubusername"
68+
"targetdevhubusername",
69+
"patchversion"
6970
],
70-
"flagChars": ["f", "k", "m", "p", "s", "v", "w", "x"],
71+
"flagChars": ["f", "k", "m", "p", "s", "v", "w", "x", "a"],
7172
"flags": [
7273
"api-version",
7374
"build-instance",
@@ -81,7 +82,8 @@
8182
"seed-metadata",
8283
"target-dev-hub",
8384
"verbose",
84-
"wait"
85+
"wait",
86+
"patch-version"
8587
],
8688
"plugin": "@salesforce/plugin-packaging"
8789
},

messages/package_convert.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The package convert creates a new package in the Dev Hub if one does not already
88

99
It then creates a new package version in the Dev Hub with contents based on the specified first-generation package.
1010

11-
The latest released non-patch package version from the specified first-generation package will be converted.
11+
By default, the latest released non-patch version from the specified first-generation package will be converted. Use --patch-version to override the default. Read more about --patch-version option in help
1212

1313
To retrieve details about a package version create request, including status and package version ID (04t), run "<%= config.bin %> package version create report -i 08c...".
1414

@@ -77,3 +77,11 @@ Directory containing metadata to be deployed prior to conversion.
7777
# flags.seed-metadata.description
7878

7979
The directory containing metadata that will be deployed on the build org prior to attempting conversion.
80+
81+
# flags.patch-version.summary
82+
83+
Specific released patch version to convert
84+
85+
# flags.patch-version.description
86+
87+
Specify a rleased patch version as major.minor.patch.build to convert to second generation package

src/commands/package/convert.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ export class PackageConvert extends SfCommand<PackageVersionCreateRequestResult>
8484
verbose: Flags.boolean({
8585
summary: messages.getMessage('flags.verbose.summary'),
8686
}),
87+
'patch-version': Flags.string({
88+
summary: messages.getMessage('flags.patch-version.summary'),
89+
description: messages.getMessage('flags.patch-version.description'),
90+
char: 'a',
91+
deprecateAliases: true,
92+
aliases: ['patchversion'],
93+
}),
8794
};
8895

8996
public async run(): Promise<PackageVersionCreateRequestResult> {
@@ -124,6 +131,7 @@ export class PackageConvert extends SfCommand<PackageVersionCreateRequestResult>
124131
installationKeyBypass: flags['installation-key-bypass'],
125132
buildInstance: flags['build-instance'] as string,
126133
seedMetadata: flags['seed-metadata'] as string,
134+
patchversion: flags['patch-version'] as string,
127135
},
128136
project
129137
);

0 commit comments

Comments
 (0)