Commit 2b488fa7 authored by Nick Craver's avatar Nick Craver

PowerShell build script love

parent 151f05cd
...@@ -30,8 +30,7 @@ foreach { ...@@ -30,8 +30,7 @@ foreach {
} }
# Restore packages and build product # Restore packages and build product
& dotnet restore "Dapper" & dotnet restore -v Minimal # Restore all packages
& dotnet restore "Dapper.Contrib"
if ($LASTEXITCODE -ne 0) if ($LASTEXITCODE -ne 0)
{ {
throw "dotnet restore failed with exit code $LASTEXITCODE" throw "dotnet restore failed with exit code $LASTEXITCODE"
...@@ -40,13 +39,18 @@ if ($LASTEXITCODE -ne 0) ...@@ -40,13 +39,18 @@ if ($LASTEXITCODE -ne 0)
& dotnet pack "Dapper" --configuration Release --output "artifacts\packages" & dotnet pack "Dapper" --configuration Release --output "artifacts\packages"
& dotnet pack "Dapper.Contrib" --configuration Release --output "artifacts\packages" & dotnet pack "Dapper.Contrib" --configuration Release --output "artifacts\packages"
#restore, compile, and run tests # Build all
& dotnet restore "Dapper.Tests" -f "artifacts\packages" # Note the exclude: https://github.com/dotnet/cli/issues/1342
& dotnet restore "Dapper.Tests.Contrib" -f "artifacts\packages" dir "Dapper*" | where {$_.PsIsContainer -and $_ -NotLike "*.EntityFramework.StrongName" } |
dir "*.Tests*" | where {$_.PsIsContainer} |
foreach { foreach {
pushd "$_" pushd "$_"
& dotnet build & dotnet build
popd
}
# Run tests
dir "*.Tests*" | where {$_.PsIsContainer} |
foreach {
pushd "$_"
& dotnet test & dotnet test
popd popd
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment