-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.cmd
More file actions
26 lines (18 loc) · 1.1 KB
/
build.cmd
File metadata and controls
26 lines (18 loc) · 1.1 KB
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
26
@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/=%
curl -o nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -k
if %errorlevel% neq 0 exit /b %errorlevel%
.\nuget.exe restore .\src\ViewModels.ApplicationState.Tests\ViewModels.ApplicationState.Tests.csproj -PackagesDirectory .\src\packages -Verbosity detailed
if %errorlevel% neq 0 exit /b %errorlevel%
.\nuget.exe restore .\src\ViewModels.ApplicationState\ViewModels.ApplicationState.csproj -PackagesDirectory .\src\packages -Verbosity detailed
if %errorlevel% neq 0 exit /b %errorlevel%
dotnet build .\src\ViewModels.ApplicationState\ViewModels.ApplicationState.csproj -p:Version=%VERSION% -c Release
if %errorlevel% neq 0 exit /b %errorlevel%
dotnet test .\src\ViewModels.ApplicationState.Tests\ViewModels.ApplicationState.Tests.csproj
if %errorlevel% neq 0 exit /b %errorlevel%
.\nuget.exe pack .\src\ViewModels.ApplicationState\ViewModels.ApplicationState.csproj -OutputDirectory .\dist -Version "%VERSION%" -BasePath .\src\ViewModels.ApplicationState\
exit /b %errorlevel%