-
Notifications
You must be signed in to change notification settings - Fork 18
Deployment
If like us you use an (semi-)automated deployment system, we use Octopus, then you might need to generate packages to be used by the deployment system. Octopus makes use of deployment flavoured nuget packages and does have a tool that will generate these, but for a couple of reasons we use NuGet.exe
to generate our packages.
So to support this there are some functions available in Build.Tools to support this, these though are not included in the set of Targets included in Core.fsx
.
Follow the directions in Changing the default build process and then modify the config, targets and build order to include the additional functions and configuration that you need.
The Versioning.fsx
script includes a function called updateDeploy which looks for NuSpecs contained in a Deploy folder. Any that are found then have their version updated to reflect the current build.
The 'Packaging.fsx` script includes a few functions :
-
packageDeploy which looks for Nuspecs contained in a deploy folder and then uses NuGet.exe to compile the nupkg file. This function expects an additional configuration item named
packaging:deployoutput
that is the location that nupkg files will be generated. -
pushDeploy which looks for nupkg files in the folder defined by
packaging:deployoutput
and if any are found attempts to push them to a NuGet library. This expects a couple of additional configuration items,packaging:deploypushurl
which is the url of the NuGet library andpackaging:deployapikey
which is the API access key required to upload packages to the NuGet library. Also supported is pushing packages to a directory or UNC, achieved by settingpackaging:deploypushto
to dir and setting the destination path in thepackaging:deploypushdir
configuration item. -
constrain allows you to post process the nupkg output directory to change unconstrained dependencies (e.g. "1.2.3") to a more sensible HighestMinor strategy (e.g. "[1.2.3,2)")
The 'Grunt.fsx` script requires that node js and the grunt-cli node module is installed globally : The following functions are available :
-
install which installs all node packages specified in the package.json within the current directory.
-
run which will run grunt using the gruntfile.js in the current directory. The configuration passed to this function can enable grunt to run in --verbose mode by specifying "grunt:verbose","true". The grunt environment --env can also be specified via the "grunt:environment","your environment name".