generated from shana/nuget-utility-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.cmd
53 lines (49 loc) · 932 Bytes
/
test.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
44
45
46
47
48
49
50
51
52
53
@echo off
setlocal
SET CONFIGURATION=Release
SET PUBLIC=""
SET BUILD=0
set UPM=0
:loop
IF NOT "%1"=="" (
IF "%1"=="-p" (
SET PUBLIC=/p:PublicRelease=true
)
IF "%1"=="--public" (
SET PUBLIC=/p:PublicRelease=true
)
IF "%1"=="-b" (
SET BUILD=1
)
IF "%1"=="--build" (
SET BUILD=1
)
IF "%1"=="-d" (
SET CONFIGURATION=Debug
)
IF "%1"=="--debug" (
SET CONFIGURATION=Debug
)
IF "%1"=="-r" (
SET CONFIGURATION=Release
)
IF "%1"=="--release" (
SET CONFIGURATION=Release
)
IF "%1"=="-u" (
SET UPM=1
)
IF "%1"=="--upm" (
SET UPM=1
)
SHIFT
GOTO :loop
)
if "x%BUILD%"=="x1" (
dotnet restore
dotnet build --no-restore -c %CONFIGURATION% %PUBLIC%
)
dotnet test --no-build --no-restore -c %CONFIGURATION% %PUBLIC%
if "x%UPM%"=="x1" (
call powershell scripts/Test-Upm.ps1
)