cli icon indicating copy to clipboard operation
cli copied to clipboard

Way to add postinstallscript option while creating First-Generation managed package version using SFDX

Open yogeshdixit41 opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. I am trying to create a managed package version of my app using a set of SFDX commands to deploy the metadata and then build beta and prod packages (as per the document here https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_build_man_pack_create.htm). I want to add the post-install script value to the apckage that gets created as a result but every time I build the package using sfdx commands it fails to add the post-install value to the package.

What are you trying to do The package that gets created should have the post-install script value on it. I have also tried adding the post-install script value on the package and then using the sfdx force:package1:version:create to create a new version of the package in the hope of retaining the post-install script value but everytime the new version is created the post-install script value is erased.

Describe the solution you'd like sfdx force:package1:version:create command should provide an option (--postinstallscript) to add the post-install value or support the postInstallScript value from the sfdx-project.json. 2GP package creation sfdx command (sfdx force:package:version:create) already supports both these options.

Describe alternatives you've considered Unfortunately, the only alternative, in this case, is to manually create the package from packaging org which defeats the purpose of using sfdx commands and building the CI/CD process for maintaining the managed package app project

Additional context https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_customize_installs.htm Here is the document that shows the support for the postinstallscript option for the 2nd Generation package creation command

yogeshdixit41 avatar Jul 18 '22 20:07 yogeshdixit41

This issue has been linked to a new work item: W-11448314

git2gus[bot] avatar Jul 18 '22 20:07 git2gus[bot]

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

github-actions[bot] avatar Jul 18 '22 20:07 github-actions[bot]

This issue has not received a response in 60 days. It will auto-close in 7 days unless a response is posted.

github-actions[bot] avatar Sep 21 '22 16:09 github-actions[bot]