-
Notifications
You must be signed in to change notification settings - Fork 33
/
pack.cmd
78 lines (71 loc) · 1.36 KB
/
pack.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@echo off
setlocal
if NOT "x%YAMATO_JOB_ID%"=="x" set GITLAB_CI=1
if NOT "x%YAMATO_JOB_ID%"=="x" set CI_COMMIT_TAG=%GIT_TAG%
if NOT "x%YAMATO_JOB_ID%"=="x" set CI_COMMIT_REF_NAME=%GIT_BRANCH%
SET CONFIGURATION=Release
SET PUBLIC=
SET BUILD=0
set UPM=0
set UNITYVERSION=2019.2
set UNITYBUILD=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
)
IF "%1"=="-n" (
SET UNITYBUILD=1
)
IF "%1"=="--unity" (
SET UNITYBUILD=1
)
IF "%1"=="-c" (
SET CONFIGURATION=%2
SHIFT
)
SHIFT
GOTO :loop
)
if "x%UNITYBUILD%" == "x1" (
set CONFIGURATION=%CONFIGURATION%Unity
)
if "x%BUILD%"=="x1" (
if "x%APPVEYOR%" == "x" (
dotnet restore
)
dotnet build --no-restore -c %CONFIGURATION% %PUBLIC%
)
dotnet pack --no-restore --no-build -c %CONFIGURATION% %PUBLIC%
if "x%UPM%"=="x1" (
call powershell scripts/Pack-Upm.ps1
) else if "x%UNITYBUILD%"=="x0" (
call powershell scripts/Pack-Npm.ps1
)