Skip to content

Commit

Permalink
Fix version suffix on dotnet pack
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshSchreuderMO committed Aug 24, 2017
1 parent ba53199 commit 3ef8227
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,22 @@ $commitHash = $(git rev-parse --short HEAD)
$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""]

echo "build: Package version suffix is $suffix"
echo "build: Build version suffix is $buildSuffix"
echo "build: Build version suffix is $buildSuffix"

foreach ($src in ls src/*) {
Push-Location $src

echo "build: Packaging project in $src"

& dotnet build -c Release --version-suffix=$buildSuffix
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix --no-build
if($LASTEXITCODE -ne 0) { exit 1 }
if($suffix -ne "") {
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix --no-build
}
else {
& dotnet pack -c Release -o ..\..\artifacts --no-build
}

if($LASTEXITCODE -ne 0) { exit 1 }

Pop-Location
}
Expand Down

0 comments on commit 3ef8227

Please sign in to comment.