Skip to content

Commit

Permalink
Tweaked build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Nov 17, 2024
1 parent b67d9d2 commit 113529a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion doc/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Run-DotNet {
if ($LASTEXITCODE -ne 0) {throw "Exit Code: $LASTEXITCODE"}
}

# Build docs
echo "Build docs"
Run-DotNet tool restore
Run-DotNet docfx --logLevel=warning --warningsAsErrors docfx.json

Expand Down
2 changes: 1 addition & 1 deletion doc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ cd `dirname $0`
dotnet="../0install.sh run --version 8.0.. https://apps.0install.net/dotnet/sdk.xml"
#fi

# Build docs
echo "Build docs"
$dotnet tool restore
$dotnet docfx --logLevel=warning --warningsAsErrors docfx.json
6 changes: 3 additions & 3 deletions src/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ function Run-DotNet {
if ($LASTEXITCODE -ne 0) {throw "Exit Code: $LASTEXITCODE"}
}

# Build
if ($env:CI) { $ci = "/p:ContinuousIntegrationBuild=True" }
echo "Build binaries"
if ($env:CI) { $ci = "/p:ContinuousIntegrationBuild=True /terminalLogger:off" }
Run-DotNet msbuild /v:Quiet /t:Restore /t:Build /p:Configuration=Release /p:Version=$Version $ci

# Prepare for publishing
echo "Prepare binaries for publishing"
Run-DotNet msbuild /v:Quiet /t:Publish /p:NoBuild=True /p:BuildProjectReferences=False /p:Configuration=Release /p:TargetFramework=net8.0 /p:Version=$Version Commands
Remove-Item ..\artifacts\Release\net8.0\publish\* -Include *.xml,*.pdb

Expand Down
4 changes: 2 additions & 2 deletions src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ cd `dirname $0`
dotnet="../0install.sh run --version 8.0.. https://apps.0install.net/dotnet/sdk.xml"
#fi

# Build
echo "Build binaries"
$dotnet msbuild -v:Quiet -t:Restore -t:Build -p:Configuration=Release -p:Version=${1:-1.0.0-pre} ${CI+-p:ContinuousIntegrationBuild=True}

# Prepare for publishing
echo "Prepare binaries for publishing"
$dotnet msbuild -v:Quiet -t:Publish -p:NoBuild=True -p:BuildProjectReferences=False -p:Configuration=Release -p:TargetFramework=net8.0 -p:Version=${1:-1.0.0-pre} Commands
find ../artifacts/Release/net8.0/publish -name "{*.xml,*.pdb}" -type f -delete
3 changes: 2 additions & 1 deletion src/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ function Run-DotNet {
if ($LASTEXITCODE -ne 0) {throw "Exit Code: $LASTEXITCODE"}
}

Run-DotNet test --no-build --configuration Release UnitTests\UnitTests.csproj
echo "Unit tests"
Run-DotNet test --verbosity quiet --no-build --configuration Release UnitTests\UnitTests.csproj

popd
4 changes: 2 additions & 2 deletions src/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ cd `dirname $0`
dotnet="../0install.sh run --version 8.0..!8.1 https://apps.0install.net/dotnet/sdk.xml"
#fi

# Unit tests (without .NET Framework)
$dotnet test --no-build --configuration Release --framework net8.0 UnitTests/UnitTests.csproj
echo "Unit tests"
$dotnet test --verbosity quiet --no-build --configuration Release --framework net8.0 UnitTests/UnitTests.csproj

0 comments on commit 113529a

Please sign in to comment.