This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#addin "Cake.FileHelpers&version=3.2.0" | |
void Build(string root = "") | |
{ | |
var solution = Argument<string>("Solution", "") != "" ? | |
new FilePath($"{root}{Argument<string>("Solution")}/{Argument<string>("Solution")}.sln") : | |
new FilePath(root + "BuildSolution.sln"); | |
MSBuild(solution, settings => settings | |
.SetConfiguration(Argument<string>("Configuration", "Debug")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#addin "Cake.FileHelpers&version=3.2.0" | |
void Restore(string root) => | |
NuGetRestore(new FilePath($"{root}{Argument<string>("Solution")}/{Argument<string>("Solution")}.sln"), GetRestoreSettings()); | |
NuGetRestoreSettings GetRestoreSettings() | |
{ | |
return new NuGetRestoreSettings | |
{ | |
NonInteractive = true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#addin "Cake.FileHelpers&version=3.2.0" | |
void RestoreAll(string root = "", string glob = "**/*.csproj") | |
{ | |
var csprojFiles = GetFiles(root + glob); | |
if (csprojFiles.Any()) | |
{ | |
var tempSln = new FilePath(root + "BuildSolution.sln"); | |
FileWriteText(tempSln, CreateTempSolution(csprojFiles)); | |
NuGetRestore(tempSln, GetRestoreSettings()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task("Restore").Does(() => Restore()); | |
Task("Build").Does(() => Build()); | |
Task("Publish") | |
.IsDependentOn("Restore") | |
.IsDependentOn("Build"); | |
RunTarget(Argument<string>("Target", "")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task("RestoreAll").Does(() => RestoreAll()); | |
Task("Build").Does(() => Build()); | |
Task("PublishAll") | |
.IsDependentOn("RestoreAll") | |
.IsDependentOn("Build"); | |
RunTarget(Argument<string>("Target", "")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./build.ps1 -Target="Publish" -Solution="Jarvis" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./build.ps1 -Target="PublishAll" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pool: | |
name: Azure Pipelines | |
steps: | |
- task: Cake@0 | |
displayName: Publish | |
inputs: | |
target: Publish | |
arguments: '-Solution=Jarvis -Configuration=Release' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#addin "Cake.FileHelpers&version=3.2.0" | |
#addin "Cake.Powershell&version=0.4.8" | |
#addin "Cake.IIS&version=0.4.2" | |
#addin "Microsoft.Win32.Registry&version=4.0.0.0" | |
#addin "System.Reflection.TypeExtensions&version=4.1.0.0" | |
void CreateIISWebsites( | |
string root = "", | |
string glob = "**/*.csproj", | |
bool aspNetCore = false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./build.ps1 -Target="CreateIISWebsites" |
OlderNewer