Add argument to specify "ancestor" with force:package:version:create
#2362
Replies: 3 comments
-
It would be good if we could fix this soon. I am running into this same issue in our automation. |
Beta Was this translation helpful? Give feedback.
-
Any chance of any acknowledgement of this? It would be a basic feature, and its a strange omission from the version:create command! |
Beta Was this translation helpful? Give feedback.
-
Thank you for filing this feature request. However, we've determined that the functionality you've requested must be completed by another team. Please submit your request to the Salesforce IdeaExchange. Then post a link to the request in this issue so that others can upvote your idea. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
In a CI/CD setup, I automate the creation of package versions. No developers maintain the
sfdx-project.json
file. We are creating 2GP managed packages and one of the requirements for a new managed package version to be upgradeable in the subscriber org is if the new package version specified an ancestor id.Currently, the ancestor package version id can only be specified in the sfdx-project.json file. Which means someone or something must manage this file before running the
force:package:version:create
command.What are you trying to do
Specify the ancestor package version id as an argument to
force:package:version:create
command like I can specifyversionnumber
so that it is easier to script package version creation with no maintenance ofsfdx-project.json
.Describe the solution you'd like
A new flag added to the
force:package:version:create
command to specify the ancestor.Example Usage
Describe alternatives you've considered
In our CI/CD service, I use a custom bash script to update the
sfdx-project.json
with theancestorId
value, create the package version, then discard the file changes.https://gist.github.com/douglascayers/e3a9525729a1b512618adf720e3fbe94
With that script, then our project's
sfdx-project.json
can be as simple as the following and never be updated or maintained as the script handles determining the correct next major.minor.patch.build version number, ancestor id, and promoting versions.Beta Was this translation helpful? Give feedback.
All reactions