-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.cmd
executable file
·65 lines (48 loc) · 1.59 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@echo off
set BASE=%~dp0
set NODE_DIR=%BASE%tools\node\windows\
set BIT_64=
set BIT_32=32
If Defined ProgramFiles(x86) (
set BIT=%BIT_64%
) Else (
set BIT=%BIT_32%
)
echo =============================================================
echo Validating node installation...
echo =============================================================
if exist "%NODE_DIR%node.exe" (
goto standalone
) else (
goto global
)
:standalone
REM If a standalone node installation exists, use that
set NODE=%NODE_DIR%node%BIT%.exe
echo Standalone node installation found!
echo Location: "%NODE%"
echo =============================================================
echo Installing dependencies...
echo =============================================================
CALL "%NODE_DIR%npm" install || exit /b 1
CALL "%NODE_DIR%bower" install || exit /b 1
echo =============================================================
echo Performing Grunt build...
echo =============================================================
CALL "%NODE_DIR%grunt" %* || exit /b 1
goto continue
:global
REM Otherwise, assume global install is available
echo Global node installation found!
echo =============================================================
echo Installing dependencies...
echo =============================================================
CALL npm install || exit /b 1
CALL bower install || exit /b 1
echo =============================================================
echo Performing Grunt build...
echo =============================================================
CALL grunt %* || exit /b 1
goto continue
:continue
echo DONE