forked from rancher/system-agent-installer-rke2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.ps1
33 lines (28 loc) · 833 Bytes
/
make.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
if (!(Test-Path .dapper.exe)) {
$dapperURL = "https://releases.rancher.com/dapper/latest/dapper-Windows-x86_64.exe"
Write-Host "no .dapper.exe, downloading $dapperURL"
curl.exe -sfL -o .dapper.exe $dapperURL
}
if ($args.Count -eq 0) {
$args = @("build")
}
if ($args[0] -eq "build") {
Write-Host "Running build"
.dapper.exe -f Dockerfile-windows.dapper build
scripts\windows\build.ps1
exit
}
if ($args[0] -eq "publish") {
Write-Host "Running publish"
.dapper.exe -f Dockerfile-windows.dapper publish
scripts\windows\publish.ps1
exit
}
if ($args[0] -eq "clean") {
Remove-Item .dapper.exe
Remove-Item Dockerfile-windows.dapper* -Exclude "Dockerfile-windows.dapper"
}
if (Test-Path scripts\$($args[0]).ps1) {
.dapper.exe -f Dockerfile-windows.dapper $($args[0])
exit
}