-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.ps1
More file actions
46 lines (38 loc) · 933 Bytes
/
make.ps1
File metadata and controls
46 lines (38 loc) · 933 Bytes
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
param(
[Parameter(Position=0)]
[ValidateSet('build','run','test','cert','dns-test','acme-test','clean')]
[string]$Target = 'build'
)
function Invoke-Build {
go build .
}
function Invoke-Run {
go run .
}
function Invoke-Test {
go test ./...
}
function Invoke-Cert {
Invoke-Build
.\libdns-websupport.exe create-cert
}
function Invoke-DnsTest {
Invoke-Build
.\libdns-websupport.exe test
}
function Invoke-AcmeTest {
Invoke-Build
.\libdns-websupport.exe acme-test
}
function Invoke-Clean {
if (Test-Path .\libdns-websupport.exe) { Remove-Item .\libdns-websupport.exe -Force }
}
switch ($Target) {
'build' { Invoke-Build }
'run' { Invoke-Run }
'test' { Invoke-Test }
'cert' { Invoke-Cert }
'dns-test' { Invoke-DnsTest }
'acme-test' { Invoke-AcmeTest }
'clean' { Invoke-Clean }
}