Parameters
As a package author, I should be able to specify parameters in the choco-bear.json config and the choco-bear extension MUST do the following:
- append the parameters and their descriptions to the description of the package during nuspec generation
- use the parameter defaults in the execution the package.
- override if a SetupConfig parameter is set
- override if parameters are found in the
$packageParameters
string - pass the values back to package author via
$vars = Install-ChocoBearPackage
, where$var.parameters
is the parameter values. This will allow package authors to retrieve the values without having to callRead-ChocoBearArgs
a second time to parse the arguments.
Common Parameters
- NoInstall - download the installer, stop executing, copy the installer to the downloads folder
- Installer - use the installer instead of extracting the files, if applicable
- User - install the application in a user directory e.g. $Env:USERPROFILE\apps or set the user flags for the installer
-
TargetDir - allow the user to specify where the application is installed. Pass this to the installer if
/Installer
is set. -
SetupConfig - allow the user to specify a setup config that overrides the choco-bear.json settings e.g.
/SetupConfig="path/to/whatever.json"
- ConfigName - set the name of the configuration parameter the installer expects
- Config - the configuration file for the installer. e.g. Visual Studio, SQL SERVER take configuration files.
- ConfigPath - where to save the configuration file if applicable. e.g php would be just php.ini which saved to the root folder