-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Describe the bug
Promoting a package which is being built on a MAJOR.MINOR.PATCH combination which has previously been promoted DOES NOT FAIL, instead it prints: "VERSION_ID is already promoted". This is not true, the version number being built is NOT promoted, it is a previous build of the same package.
This hides the fact that a version bump was not performed and only manifests itself when attempting to release to PROD.
packages/core/src/package/promote/PromoteUnlockedPackageImpl.ts
try {
result = await packageVersion.promote();
result.id = packageVersionData.SubscriberPackageVersionId;
} catch (e) {
if (e.message.includes('previously released')) {
SFPLogger.log(`Package ${this.package_version_id} is already promoted, Ignoring`);
} else throw e;
}
To Reproduce
- Build and Promote a package
- Do not add any changes in version numbers
- Build and Promote a package again
Expected behavior
Error that package cannot be promoted, becuase another build of the same MAJOR.MINOR.PATCH has already been promoted
CLI Error: "You already promoted a package version with this major.minor.patch version number. For a given major.minor.patch number, you can promote only one version."
Actual behaviour
Package 04tXXXXXXXX is already promoted*** Ignoring
Platform Details (please complete the following information):
Tested with older version: sfp -- The DX@Scale CLI -Version:25.5.3 -Release:December 23
But checked code in new SFP repository and it is still the same.
- OS:
- Version [e.g. CLI Version eg: 1.6.6]
- Salesforce CLI(sfdx cli) Version:
- CI Platform: GitHub Actions
Additional context
Add any other context about the problem here.