forked from aritchie/userdialogs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.cake
53 lines (46 loc) · 1.18 KB
/
build.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
48
49
50
51
52
53
#addin "Cake.Xamarin"
#addin "Cake.FileHelpers"
#tool nunit.consolerunner
#tool gitlink
var target = Argument("target", Argument("t", "package"));
Setup(x =>
{
DeleteFiles("./*.nupkg");
DeleteFiles("./output/*.*");
if (!DirectoryExists("./output"))
CreateDirectory("./output");
});
Task("build")
.Does(() =>
{
NuGetRestore("./src/lib.sln");
DotNetBuild("./src/lib.sln", x => x
.SetConfiguration("Release")
.SetVerbosity(Verbosity.Minimal)
.WithProperty("TreatWarningsAsErrors", "false")
);
});
Task("package")
.IsDependentOn("build")
.Does(() =>
{
GitLink("./", new GitLinkSettings
{
RepositoryUrl = "https://github.com/aritchie/userdialogs",
Branch = "master"
});
NuGetPack(new FilePath("./nuspec/Acr.UserDialogs.nuspec"), new NuGetPackSettings());
MoveFiles("./*.nupkg", "./output");
});
Task("publish")
.IsDependentOn("package")
.Does(() =>
{
NuGetPush("./output/*.nupkg", new NuGetPushSettings
{
Source = "http://www.nuget.org/api/v2/package",
Verbosity = NuGetVerbosity.Detailed
});
CopyFiles("./ouput/*.nupkg", "c:\\users\\allan.ritchie\\dropbox\\nuget");
});
RunTarget(target);