forked from Azure/azure-webjobs-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuild.ps1
44 lines (36 loc) · 1.33 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
param (
[string]$packageSuffix = "0",
[bool]$isLocal = $false,
[string]$outputDirectory = "..\..\buildoutput"
)
if ($isLocal){
$packageSuffix = "dev" + [datetime]::UtcNow.Ticks.ToString()
Write-Host "Local build - setting package suffixes to $packageSuffix" -ForegroundColor Yellow
}
dotnet --version
dotnet build Webjobs.sln -v q
if (-not $?) { exit 1 }
$projects =
"src\Microsoft.Azure.WebJobs\WebJobs.csproj",
"src\Microsoft.Azure.WebJobs.Host\WebJobs.Host.csproj",
"src\Microsoft.Azure.WebJobs.Host\WebJobs.Host.Sources.csproj",
"src\Microsoft.Azure.WebJobs.Logging\WebJobs.Logging.csproj",
"src\Microsoft.Azure.WebJobs.Logging.ApplicationInsights\WebJobs.Logging.ApplicationInsights.csproj",
"src\Microsoft.Azure.WebJobs.Extensions.Storage\WebJobs.Extensions.Storage.csproj",
"src\Microsoft.Azure.WebJobs.Host.Storage\WebJobs.Host.Storage.csproj",
"test\Microsoft.Azure.WebJobs.Host.TestCommon\WebJobs.Host.TestCommon.csproj"
foreach ($project in $projects)
{
$cmd = "pack", "$project", "-o", $outputDirectory, "--no-build"
if ($packageSuffix -ne "0")
{
$cmd += "--version-suffix", "-$packageSuffix"
}
& dotnet $cmd
}
### Sign package if build is not a PR
$isPr = Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER
if (-not $isPr -and -not $isLocal) {
& ".\tools\RunSigningJob.ps1"
if (-not $?) { exit 1 }
}