forked from Azure-Samples/azure-servicebus-relay-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
29 lines (25 loc) · 1.08 KB
/
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
###########################################################
# Start - Initialization - Invocation, Logging etc
###########################################################
$VerbosePreference = "SilentlyContinue"
$ErrorActionPreference = "Stop"
$scriptPath = $MyInvocation.MyCommand.Path
$scriptDir = Split-Path $scriptPath
& "$scriptDir\..\scripts\init.ps1"
if(-not $?)
{
throw "Initialization failure."
}
###########################################################
# End - Initialization - Invocation, Logging etc
###########################################################
& "$scriptDir\..\scripts\build\buildCSharp.bat" "$scriptDir"
if($LASTEXITCODE -eq 0)
{
Write-SpecialLog "Build Complete for '$scriptDir!'" (Get-ScriptName) (Get-ScriptLineNumber)
}
else
{
Write-ErrorLog "Build returned non-zero exit code: $LASTEXITCODE. Please check if the project built successfully before you can launch examples." (Get-ScriptName) (Get-ScriptLineNumber)
throw "Build returned non-zero exit code: $LASTEXITCODE. Please check if the project built successfully before you can launch examples."
}