forked from infinispan/dotnet-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.ps1
33 lines (25 loc) · 841 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
# This file contains necesary code to be able to run FAKE, everything else is in build.fsx
Push-Location buildtools
if (-not (Test-Path "tmp")) {
mkdir tmp
}
$nugetSource = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
$nugetPath = Join-Path (Get-Location) "tmp/nuget/nuget.exe"
if (-not (Test-Path $nugetPath)) {
mkdir tmp/nuget
(New-Object System.Net.WebClient).DownloadFile($nugetSource, $nugetPath)
}
$fakePath = Join-Path (Get-Location) "tmp/FAKE/tools/FAKE.exe"
if (-not (Test-Path $fakePath)) {
.\tmp\nuget\nuget.exe "install" "FAKE" "-ExcludeVersion" "-Version" "4.63.2" "-OutputDirectory" "tmp"
}
$target = "build"
if($args.Count -ge 1)
{
$target = $args[0]
}
$target = "target=" + $target
& $fakePath "build.fsx" $target
$fakeExitCode = $LASTEXITCODE
Pop-Location
exit $fakeExitCode