forked from Azure/azure-webjobs-sdk-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.ps1
42 lines (33 loc) · 998 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
36
37
38
39
40
41
42
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 -v q
if (-not $?) { exit 1 }
$projects =
"WebJobs.Extensions",
"WebJobs.Extensions.CosmosDB",
"WebJobs.Extensions.Http",
"WebJobs.Extensions.Twilio",
"WebJobs.Extensions.SendGrid"
foreach ($project in $projects)
{
$cmd = "pack", "src\$project\$project.csproj", "-o", $outputDirectory, "--no-build"
if ($packageSuffix -ne "0")
{
$cmd += "--version-suffix", "-$packageSuffix"
}
& dotnet $cmd
}
### Sign package if build is not a PR
$shouldPackage = -not $env:APPVEYOR_PULL_REQUEST_NUMBER -or $env:APPVEYOR_PULL_REQUEST_TITLE.Contains("[pack]")
if ($shouldPackage) {
& ".\tools\RunSigningJob.ps1"
if (-not $?) { exit 1 }
}