Skip to content

Commit

Permalink
feat: adding new patch version conversion parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshnt committed Feb 26, 2025
1 parent 0635794 commit 0451aa6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
8 changes: 5 additions & 3 deletions command-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@
"installationkey",
"installationkeybypass",
"target-hub-org",
"targetdevhubusername"
"targetdevhubusername",
"patchversion"
],
"flagChars": ["f", "k", "m", "p", "s", "v", "w", "x"],
"flagChars": ["f", "k", "m", "p", "s", "v", "w", "x", "a"],
"flags": [
"api-version",
"build-instance",
Expand All @@ -81,7 +82,8 @@
"seed-metadata",
"target-dev-hub",
"verbose",
"wait"
"wait",
"patch-version"
],
"plugin": "@salesforce/plugin-packaging"
},
Expand Down
10 changes: 9 additions & 1 deletion messages/package_convert.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The package convert creates a new package in the Dev Hub if one does not already

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

The latest released non-patch package version from the specified first-generation package will be converted.
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

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...".

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

The directory containing metadata that will be deployed on the build org prior to attempting conversion.

# flags.patch-version.summary

Specific released patch version to convert

# flags.patch-version.description

Specify a rleased patch version as major.minor.patch.build to convert to second generation package
8 changes: 8 additions & 0 deletions src/commands/package/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ export class PackageConvert extends SfCommand<PackageVersionCreateRequestResult>
verbose: Flags.boolean({
summary: messages.getMessage('flags.verbose.summary'),
}),
'patch-version': Flags.string({
summary: messages.getMessage('flags.patch-version.summary'),
description: messages.getMessage('flags.patch-version.description'),
char: 'a',
deprecateAliases: true,
aliases: ['patchversion'],
}),
};

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

0 comments on commit 0451aa6

Please sign in to comment.