How to get Cake Build preerelease addin from an alternative source?

We are creating an internal Cake addin application for our build scripts.

We are currently publishing it as a preview for the internal feed, we previously consumed add- #addin [id] from NuGet with the syntax #addin [id] as follows:

 #addin "Cake.FileHelpers" 

Can I change the default feed or specify a channel in any way? And is there a way to indicate that early release is allowed?

+5
source share
1 answer

As stated on cakebuild.net , the #addin directive also supports URI syntax ( #addin nuget:[uri]?package=packageid[¶meters] ), which can be used to specify parameters such as feed, version, and preerelease.

Usage example:

 #addin nuget:?package=Cake.Foo #addin nuget:?package=Cake.Foo&version=1.2.3 #addin nuget:?package=Cake.Foo&prerelease #addin nuget:https://myget.org/f/Cake/?package=Cake.Foo&prerelease 

You can also override the default nuget location for all additions by specifying the NUGET_SOURCE environment variable, the NUGET_SOURCE argument to Cake, or add a configuration file as shown below

 [Nuget] Source=http://myfeed/nuget/ 

You save it as cake.config and place it along your build.cake file. You can learn more about Cake configuration here and default values here.

But to get the latest preview, I would suggest switching to the syntax #addin nuget:[feedurl]?package=[packageid]&prerelease .

+5
source

All Articles