Skip to content

Commit 639020c

Browse files
authored
Fix build script (migrating to Actions)
1 parent 92044c2 commit 639020c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Build.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ $suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch
2525

2626
Write-Output "build: Package version suffix is $suffix"
2727

28+
& dotnet build -c Release --version-suffix=$buildSuffix /p:ContinuousIntegrationBuild=true
29+
if($LASTEXITCODE -ne 0) { throw "Build failed" }
30+
2831
foreach ($src in Get-ChildItem src/*) {
2932
Push-Location $src
3033

3134
Write-Output "build: Packaging project in $src"
32-
33-
if ($suffix) {
34-
& dotnet publish -c Release -o ./obj/publish --version-suffix=$suffix
35-
& dotnet pack -c Release -o ../../artifacts --no-build --version-suffix=$suffix
36-
} else {
37-
& dotnet publish -c Release -o ./obj/publish
38-
& dotnet pack -c Release -o ../../artifacts --no-build
39-
}
35+
if ($suffix) {
36+
& dotnet pack -c Release --no-build --no-restore -o ../../artifacts --version-suffix=$suffix
37+
} else {
38+
& dotnet pack -c Release --no-build --no-restore -o ../../artifacts
39+
}
4040
if($LASTEXITCODE -ne 0) { throw "Packaging failed" }
4141

4242
Pop-Location

0 commit comments

Comments
 (0)