-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcake.cs
More file actions
70 lines (59 loc) · 1.73 KB
/
cake.cs
File metadata and controls
70 lines (59 loc) · 1.73 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#:sdk Cake.Sdk@6.1.1
var target = Argument("target", "Publish");
var configuration = Argument("configuration", "Release");
var sln = "./cats.slnx";
Task("Clean")
.Does(() =>
{
CleanDirectorySettings settings = new()
{
Force = true
};
CleanDirectories("./src/**/bin/{configuration}", settings);
CleanDirectory("./artifacts", settings);
});
Task("Restore")
.Does(() => DotNetRestore(sln));
Task("Build")
.IsDependentOn("Clean")
.IsDependentOn("Restore")
.Does(() => DotNetBuild(sln, new DotNetBuildSettings
{
Configuration = configuration,
NoRestore = true,
}));
Task("Test")
.IsDependentOn("Build")
.Does(() => DotNetTest(sln, new DotNetTestSettings
{
Configuration = configuration,
NoBuild = true,
NoRestore = true,
}));
Task("Publish")
.IsDependentOn("Test")
.Does(() =>
{
// publish the Server.UI
DotNetPublish("./src/Server.UI/Server.UI.csproj", new DotNetPublishSettings()
{
Configuration = configuration,
NoBuild = true,
NoRestore = true,
OutputDirectory = "./artifacts/Server.UI",
});
//publish the Database Seeder
DotNetPublish("./src/DatabaseSeeding/DatabaseSeeding.csproj", new DotNetPublishSettings()
{
Configuration = configuration,
NoBuild = true,
NoRestore = true,
OutputDirectory = "./artifacts/DatabaseSeeding",
});
DotNetBuild("./src/Database/CatsDb/CatsDb.sqlproj", new DotNetBuildSettings()
{
Configuration = configuration,
OutputDirectory = "./artifacts/"
});
});
RunTarget(target);