-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.bat
37 lines (28 loc) · 894 Bytes
/
build.bat
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
27
28
29
30
31
32
33
34
35
36
37
@echo Off
set config=%1
if "%config%" == "" (
set config=Release
)
set version=
if not "%BuildCounter%" == "" (
set packversionsuffix=--version-suffix ci-%BuildCounter%
)
cd %~dp0
call create-buildtools.bat
if not "%errorlevel%"=="0" goto failure
rem set working folder
cd %~dp0library
rem build library and run unit tests
call dotnet restore
if not "%errorlevel%"=="0" goto failure
call dotnet build --configuration %config% --no-restore
if not "%errorlevel%"=="0" goto failure
call dotnet test mvp.xml.tests\mvp.xml.tests.csproj --configuration %config% --no-restore --no-build
if not "%errorlevel%"=="0" goto failure
rem create nuget package in artifacts folder
call dotnet pack mvp.xml\mvp.xml.csproj --configuration %config% %packversionsuffix% --output ..\..\artifacts --no-build --no-restore
if not "%errorlevel%"=="0" goto failure
:success
exit /b 0
:failure
exit /b -1