-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathpack.ps1
More file actions
40 lines (31 loc) · 1.09 KB
/
pack.ps1
File metadata and controls
40 lines (31 loc) · 1.09 KB
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
<#
.Synopsis
This script creates NuGet packages from all of the projects in this repository.
Note: build.cmd should be run before running this script.
#>
[CmdletBinding()]
param(
[Parameter()]
[ValidateSet('Debug','Release')]
[string]$BuildConfig = "Release"
)
$ErrorActionPreference = "Stop"
$PublishRelativePath = "bin\PackageOutput"
$LogDirectory = "$PSScriptRoot\buildlogs"
$dotnet = & "$PSScriptRoot/build/resolve-dotnet.ps1"
$targetProjects = @(
"Microsoft.Extensions.Configuration.AzureAppConfiguration",
"Microsoft.Azure.AppConfiguration.AspNetCore",
"Microsoft.Azure.AppConfiguration.Functions.Worker"
)
# Create the log directory.
if ((Test-Path -Path $LogDirectory) -ne $true) {
New-Item -ItemType Directory -Path $LogDirectory | Write-Verbose
}
foreach ($project in $targetProjects)
{
$projectPath = "$PSScriptRoot\src\$project\$project.csproj"
$outputPath = "$PSScriptRoot\src\$project\$PublishRelativePath"
& $dotnet pack -c $BuildConfig -o "$outputPath" "$projectPath" --no-build | Tee-Object -FilePath "$LogDirectory\build.log"
}
exit $LASTEXITCODE