-
Notifications
You must be signed in to change notification settings - Fork 4
/
recipe.cake
47 lines (39 loc) · 1.51 KB
/
recipe.cake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#load nuget:?package=Cake.Recipe&version=1.0.0
Environment.SetVariableNames();
BuildParameters.SetParameters(context: Context,
buildSystem: BuildSystem,
sourceDirectoryPath: "./src",
title: "Cake.HgVersion",
repositoryOwner: "cake-contrib",
repositoryName: "Cake.HgVersion",
appVeyorAccountName: "cakecontrib",
solutionFilePath: "./src/Cake.HgVersion.sln",
shouldRunCodecov: false,
shouldRunDotNetCorePack: true,
shouldRunIntegrationTests: true,
wyamSourceFiles: "../../src/**/{!bin,!obj,!packages,!*Tests,}/**/*.cs",
shouldRunGitVersion: true);
BuildParameters.PrintParameters(Context);
ToolSettings.SetToolSettings(context: Context);
Task("Unzip-Addin")
.IsDependentOn("Package")
.Does(() =>
{
var addin = BuildParameters.Title;
var semVersion = BuildParameters.Version.SemVersion;
var nugetRoot = BuildParameters.Paths.Directories.NuGetPackages;
var package = $"{nugetRoot}/{addin}.{semVersion}.nupkg";
var addinDir = MakeAbsolute(Directory($"./tools/Addins/{addin}/{addin}"));
if (DirectoryExists(addinDir))
{
DeleteDirectory(addinDir, new DeleteDirectorySettings {
Recursive = true,
Force = true
});
}
Unzip(package, addinDir);
});
BuildParameters.Tasks.IntegrationTestTask.IsDependentOn("Unzip-Addin");
BuildParameters.Tasks.PublishMyGetPackagesTask.IsDependentOn("Run-Integration-Tests");
BuildParameters.Tasks.PublishNuGetPackagesTask.IsDependentOn("Run-Integration-Tests");
Build.RunDotNetCore();