-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.cmd
43 lines (35 loc) · 1.05 KB
/
build.cmd
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
38
39
40
41
42
43
@echo off
setlocal
set _config=%1
if not defined _config (
set _config=Debug
)
echo --------------------------
echo !!! Restoring packages !!!
echo --------------------------
dotnet restore
echo -------------------------
echo !!! Cleaning solution !!!
echo -------------------------
dotnet clean -c %_config%
echo -------------------------
echo !!! Building solution !!!
echo -------------------------
dotnet build -c %_config%
echo ---------------------
echo !!! Running tests !!!
echo ---------------------
dotnet test --no-build -c %_config% test\CommandLine.tests.csproj
dotnet test --no-build -c %_config% analyzer\CommandLine.Analyzer.Test\CommandLine.Analyzer.Test.csproj
if not "%_config%" == "Release" (
echo =======================================================
echo Skipping over package creation as not building Release
echo =======================================================
goto :eof
)
echo ------------------------------
echo !!! Creating NuGet package !!!
echo ------------------------------
dotnet pack -c %_config%
endlocal
@echo on