File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22set -e
33cd ` dirname $0 `
44
5- dotnet msbuild -v:Quiet -t:Restore -t:Build -p:Configuration=Release -p:Version=${1:- 1.0-dev}
5+ # Find dotnet
6+ if command -v dotnet > /dev/null 2> /dev/null; then
7+ dotnet=" dotnet"
8+ else
9+ dotnet=" ../0install.sh run --version 3.1..!3.2 https://apps.0install.net/dotnet/core-sdk.xml"
10+ fi
11+
12+ # Build
13+ $dotnet msbuild -v:Quiet -t:Restore -t:Build -p:Configuration=Release -p:Version=${1:- 1.0.0-pre}
Original file line number Diff line number Diff line change 99 dotnet=" ../0install.sh run --version 3.1..!3.2 https://apps.0install.net/dotnet/core-sdk.xml"
1010fi
1111
12- # Unit tests (without .NET Framework)
13- $dotnet test --no-build --logger junit --configuration Release --framework netcoreapp3.1 UnitTests/UnitTests.csproj
12+ # Unit tests
13+ $dotnet test --no-build --logger junit --configuration Release UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change 88 </PropertyGroup >
99
1010 <ItemGroup >
11- <PackageReference Include =" OpenServiceBroker.Server" Version =" 0.4.0 " />
11+ <PackageReference Include =" OpenServiceBroker.Server" Version =" 1.0-dev " />
1212 <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 3.1.11" />
1313 <PackageReference Include =" Swashbuckle.AspNetCore" Version =" 5.6.3" />
1414 <PackageReference Include =" Swashbuckle.AspNetCore.Newtonsoft" Version =" 5.6.3" />
Original file line number Diff line number Diff line change 1- Param ([ string ] $Version = " 0.1 -dev" )
1+ Param ($Version = " 1.0 -dev" )
22$ErrorActionPreference = " Stop"
33pushd $PSScriptRoot
44
5+ function Run-DotNet {
6+ if (Get-Command dotnet - ErrorAction SilentlyContinue) {
7+ dotnet @args
8+ } else {
9+ ..\0install.ps1 run -- batch -- version 3.1 ..! 3.2 https:// apps.0install.net/ dotnet/ core- sdk.xml @args
10+ }
11+ if ($LASTEXITCODE -ne 0 ) {throw " Exit Code: $LASTEXITCODE " }
12+ }
13+
514# Keep template and library version in-sync
6- dotnet add MyServiceBroker.csproj package OpenServiceBroker.Server -- version $Version
7- if ($LASTEXITCODE -ne 0 ) {throw " Exit Code: $LASTEXITCODE " }
8- dotnet build MyServiceBroker.csproj
9- if ($LASTEXITCODE -ne 0 ) {throw " Exit Code: $LASTEXITCODE " }
15+ Run- DotNet add MyServiceBroker.csproj package OpenServiceBroker.Server -- version $Version
16+ Run- DotNet build MyServiceBroker.csproj
1017
1118# Generate template NuGet package
12- dotnet restore .template.csproj
13- dotnet msbuild .template.csproj - v:Quiet - t:Pack - p:Configuration= Release - p:Version= $Version
14- if ($LASTEXITCODE -ne 0 ) {throw " Exit Code: $LASTEXITCODE " }
19+ Run- DotNet restore .template.csproj
20+ Run- DotNet msbuild .template.csproj / v:Quiet / t:Pack / p:Configuration= Release / p:Version= $Version
1521
1622popd
Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /usr/ bin/env bash
22set -e
33cd ` dirname $0 `
44
5+ # Find dotnet
6+ if command -v dotnet > /dev/null 2> /dev/null; then
7+ dotnet=" dotnet"
8+ else
9+ dotnet=" ../0install.sh run --version 5.0..!5.1 https://apps.0install.net/dotnet/core-sdk.xml"
10+ fi
11+
512# Keep template and library version in-sync
613dotnet add MyServiceBroker.csproj package OpenServiceBroker.Server --version ${1:- 1.0-dev}
714dotnet build MyServiceBroker.csproj
You can’t perform that action at this time.
0 commit comments