forked from rms81/IdentityServer3.Contrib.Nhibernate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
35 lines (25 loc) · 793 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
Param(
[string]$buildNumber = "0",
[string]$preRelease = "beta"
)
gci .\src -Recurse "packages.config" |% {
"Restoring " + $_.FullName
.\src\.nuget\nuget.exe install $_.FullName -o .\src\packages
}
Import-Module .\src\packages\psake.4.6.0\tools\psake.psm1
if(Test-Path Env:\APPVEYOR_BUILD_NUMBER){
$buildNumber = [int]$Env:APPVEYOR_BUILD_NUMBER
Write-Host "Using APPVEYOR_BUILD_NUMBER"
$task = "appVeyor"
}
if(Test-Path env:BuildRunner) {
$buildRunner = Get-Content env:BuildRunner
if($buildRunner -eq "myget") {
$buildNumber = [int]$Env:BuildCounter
Write-Host "Using MYGET_BUILD_NUMBER"
$task = "myGet"
}
}
"Build number $buildNumber"
Invoke-Psake .\default.ps1 $task -properties @{ buildNumber=$buildNumber; preRelease=$preRelease }
Remove-Module psake