This repository was archived by the owner on Nov 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPublish.bake
79 lines (64 loc) · 1.58 KB
/
Publish.bake
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
71
72
73
74
75
76
77
78
79
Title "Bake Building System"
Print "=== Bake Building System ==="
Set $Output "publish"
Set $Target "net5.0"
GetDateTime $DateTime
Set $PublishToPlatform "dotnet publish Bake/Bake.fsproj -c Release"
Run {
$PublishToPlatform -p:PublishTrimmed=true -r win-x64 -p:PublishReadyToRun=true -f $Target-windows
$PublishToPlatform -r osx-x64 -f $Target
$PublishToPlatform -r linux-x64 -f $Target
dotnet pack Bake.Core/Bake.Core.fsproj -o $Output -c Release
dotnet pack Bake.Actions/Bake.Actions.fsproj -o $Output -c Release
dotnet pack Bake.Parser/Bake.Parser.fsproj -o $Output -c Release
}
CreateDirectory {
$Output
$Output/src
$Output/src/Bake
$Output/src/Bake.Core
$Output/src/Bake.Actions
$Output/src/Bake.Parser
}
Action CopyProject projectName {
Atomic {
Copy "$Output/src/projectName" {
projectName/*.fs
projectName/*.fsproj
}
Delete "$Output/src/projectName/obj"
}
}
Parallel {
Copy "$Output" {
Bake.Core/bin/Release/*.nupkg
Bake.Parser/bin/Release/*.nupkg
}
Zip "$Output/Bake-bin-windows-$DateTime.zip" {
Bake/bin/Release/$Target-windows/win-x64/publish/*
}
Zip "$Output/Bake-bin-osx-x64-$DateTime.zip" {
Bake/bin/Release/$Target/osx-x64/publish/*
}
Zip "$Output/Bake-bin-linux-x64-$DateTime.zip" {
Bake/bin/Release/$Target/linux-x64/publish/*
}
Atomic {
Parallel {
CopyProject Bake.Core
CopyProject Bake.Actions
CopyProject Bake.Parser
CopyProject Bake
Copy "$Output/src" {
LICENSE
Bake.sln
Clean.bake
Publish.bake
README.md
}
}
Zip "$Output/Bake-src-$DateTime.zip" {
$Output/src/*
}
}
}