Skip to content

Commit

Permalink
Fix build.ps1 script
Browse files Browse the repository at this point in the history
Closes #992
  • Loading branch information
AArnott committed Nov 7, 2023
1 parent da15c4f commit da36fb9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ Param(

$msbuildCommandLine = "dotnet build `"$PSScriptRoot\Nerdbank.GitVersioning.sln`" /m /verbosity:$MsBuildVerbosity /nologo /p:Platform=`"Any CPU`" /t:build,pack"

if (Test-Path "C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll") {
$msbuildCommandLine += " /logger:`"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll`""
}

if ($Configuration) {
$msbuildCommandLine += " /p:Configuration=$Configuration"
}
Expand All @@ -34,6 +30,13 @@ try {
}
}

if ($PSCmdlet.ShouldProcess('src/nbgv', 'dotnet publish')) {
dotnet publish src/nbgv -c $Configuration -o src/nerdbank-gitversioning.npm/out/nbgv.cli/tools/net6.0/any
if ($LASTEXITCODE -ne 0) {
throw "dotnet publish failed"
}
}

if ($PSCmdlet.ShouldProcess("$PSScriptRoot\src\nerdbank-gitversioning.npm", "gulp")) {
cd "$PSScriptRoot\src\nerdbank-gitversioning.npm"
yarn install
Expand Down

0 comments on commit da36fb9

Please sign in to comment.