-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.cmd
More file actions
25 lines (18 loc) · 849 Bytes
/
build.cmd
File metadata and controls
25 lines (18 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@echo off
SET VERSION=0.0.0
IF NOT [%1]==[] (SET VERSION=%1)
SET TAG=0.0.0
IF NOT [%2]==[] (SET TAG=%2)
SET TAG=%TAG:tags/=%
SET RUNTESTS=true
IF NOT [%3]==[] (SET RUNTESTS=%3)
dotnet restore .\src\AggregateRepository.KurrentDB.sln -PackagesDirectory .\src\packages -Verbosity detailed
dotnet format .\src\AggregateRepository.KurrentDB.sln --severity warn --verify-no-changes -v diag
IF %errorlevel% neq 0 EXIT /B %errorlevel%
IF /I "%RUNTESTS%"=="true" (
dotnet test .\src\AggregateRepository.KurrentDB.Tests\AggregateRepository.KurrentDB.Tests.csproj
IF %errorlevel% neq 0 EXIT /B %errorlevel%
) ELSE (
ECHO Skipping tests because RUNTESTS is not set to "true".
)
dotnet pack .\src\AggregateRepository.KurrentDB\AggregateRepository.KurrentDB.csproj -o .\dist -p:Version="%VERSION%" -p:PackageVersion="%VERSION%" -p:Tag="%TAG%" -c Release