Obtain Silent Arg Strings outside of Package Creation
darksidemilk opened this issue · 2 comments
Checklist
- I have verified this is the correct repository for opening this issue.
- I have verified no other issues exist related to my request.
Is Your Feature Request Related To A Problem? Please describe.
Currently, a licensed user can use choco new
or the chocolatey package builder via explorer context menu to have choco attempt to get the silent args for a given LOCAL file and make a package from it.
I would like to be able to use just the silent arg parsing on its own. Whether that be using a choco context menu option, a choco command, or a powershell helper function.
Describe The Solution. Why is it needed?
Having the modular ability to obtain silent arg strings could reduce repeated tasks and improve on CI/CD workflows.
If we are using an internal asset repository like a proget asset repo or a nexus blob store (I believe that's what its called there, we use proget) to store install files that are referenced in choco packages, you can end up creating many copies of what are sometimes very large install files when you only need it in one place at a url.
Ideally, we'd be able to reference the installer at a web url or a local file path to obtain the silent arg string.
We could then create a package and reference the uninstall string in the packageArgs or provide that in the choco package builder gui while referencing the url in that same gui.
Internally our process is
- creating a local version of a package with choco new
- upload the install files to our assets repo
- remove the embedded file from the package/replace with .ignore file
- edit the chocolateyinstall.ps1 to reference $url instead of file/filelocation and edit it to use install-chocolateyPackage instead of install-chocolateyinstallpackage
It would be nice to be able to just make an internal package by referencing the install file at a url or something similar to that.
I realize we can achieve some of this with templates in choco new but as far as I have found we need to make a full local package with files embedded in order to use the auto silent arg grabber.
Additional Context
No response
Related Issues
No response
@darksidemilk thanks for reaching out!
If I have understood the issue correctly, I think I have a solution that will reduce the number of repeated steps.
Rather than doing this:
- creating a local version of a package with choco new
- upload the install files to our assets repo
- remove the embedded file from the package/replace with .ignore file
- edit the chocolateyinstall.ps1 to reference $url instead of file/filelocation and edit it to use install-chocolateyPackage instead of install-chocolateyinstallpackage
Do the following:
- Upload the install files to our assets repo
- Run
choco new --url=<url_to_asset_in_repo> --use-original-location
- A new Chocolatey package will be generated without embedding the file, and it will point to the original location in the asset repo
If this isn't what you are looking for, or if I have misunderstood something, let me know.