-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.cmd
More file actions
35 lines (31 loc) · 840 Bytes
/
Copy pathdeploy.cmd
File metadata and controls
35 lines (31 loc) · 840 Bytes
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
@echo off
CALL npm install typescript
IF %ERRORLEVEL% NEQ 0 (
ECHO Unable to install typescript
GOTO Error
)
IF (%1%=="") GOTO SetTsc
cd %1%
:SetTsc
IF EXIST ".\node_modules\.bin\tsc.cmd" (
SET tsc=CALL ".\node_modules\.bin\tsc.cmd"
GOTO Build
)
IF EXIST "%ProgramFiles(x86)%\Microsoft Sdks\Typescript\0.9\tsc.exe" (
SET tsc="%ProgramFiles(x86)%\Microsoft Sdks\Typescript\0.9\tsc.exe"
GOTO Build
)
IF EXIST "%ProgramFiles%\Microsoft Sdks\Typescript\0.9\tsc.exe" (
SET tsc="%ProgramFiles%\Microsoft Sdks\Typescript\0.9\tsc.exe"
GOTO Build
GOTO
ECHO TypeScript compiler not found
EXIT 999
:Build
ECHO Cleaning folder
del %DEPLOYMENT_TARGET%\*.* /S /Q
ECHO Building TypeScript: pblander.ts (using %tsc%)
%tsc% src\game\pblander.ts
xcopy %DEPLOYMENT_SOURCE%\src %DEPLOYMENT_TARGET% /S /Y
:Error
EXIT %ERRORLEVEL%