Skip to content

Commit

Permalink
attempt at fixing build script
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkis117 committed Jan 3, 2018
1 parent 310a52b commit adea3a2
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,45 @@ $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
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 }
& dotnet build -c Release --version-suffix=$buildSuffix

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

Pop-Location
}

foreach ($test in ls test/*.Tests) {
Push-Location $test
Push-Location $test

echo "build: Testing project in $test"

& dotnet test -c Release
if($LASTEXITCODE -ne 0) { exit 3 }
& dotnet test -c Release
if($LASTEXITCODE -ne 0) { exit 3 }

Pop-Location
}

foreach ($test in ls test/*.PerformanceTests) {
Push-Location $test

echo "build: Building performance test project in $test"

& dotnet build -c Release
if($LASTEXITCODE -ne 0) { exit 2 }

Pop-Location
Pop-Location
}

Pop-Location

0 comments on commit adea3a2

Please sign in to comment.