-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.build.ps1
53 lines (45 loc) · 964 Bytes
/
.build.ps1
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
<#
.DESCRIPTION
TinyHotKey build script, run using cmdlet Invoke-Build from module InvokeBuild
#>
param (
[string]
$Version
)
task AssertVersion {
if (-not $Version) {
throw "Specify version with -Version parameter"
}
}
task DotnetRestore {
exec {
dotnet restore
}
}
task DotnetFormat DotnetRestore, {
exec {
dotnet format --no-restore
}
}
task DotnetFormatCheck DotnetRestore, {
exec {
dotnet format --no-restore --verify-no-changes
}
}
task DotnetBuild DotnetRestore, {
exec {
dotnet build --no-restore
}
}
task DotnetPack AssertVersion, {
exec {
dotnet pack .\src\TinyHotKey\TinyHotKey.csproj `
--configuration Release `
--output . `
/p:ContinuousIntegrationBuild="true" `
/p:EnableSourcelink="true" `
/p:Version=$Version
}
}
task Package DotnetPack
task . DotnetFormatCheck, DotnetBuild