-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsbt.bat
75 lines (59 loc) · 1.49 KB
/
sbt.bat
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
@echo off
setlocal
pushd
cd "%~dp0"
set JVM_PARAMS=-Xss2m -Xmx712m -XX:MaxPermSize=256m -XX:+CMSClassUnloadingEnabled
set LIFT_RUN_MODE=-Drun.mode=development
set TRY_JREBEL=true
set LOG_LEVEL=
set NO_PAUSE=false
set DO_LOOP=false
:PARSER_LOOP
if "%~1"=="" goto :PARSER_END
if "%~1"=="--prod" (
set LIFT_RUN_MODE=-Drun.mode=production
goto :PARSER_CONTINUE
)
if "%~1"=="--debug" (
set LOG_LEVEL="set logLevel:=Level.Debug"
goto :PARSER_CONTINUE
)
if "%~1"=="~lift" (
set SBT_PARAMS=%SBT_PARAMS% container:start ~compile container:stop
set JREBEL_PLUGINS=%JREBEL_PLUGINS% -Drebel.lift_plugin=true
goto :PARSER_CONTINUE
)
if "%~1"=="--no-jrebel" (
set TRY_JREBEL=false
goto :PARSER_CONTINUE
)
if "%~1"=="--loop" (
set DO_LOOP=true
goto :PARSER_CONTINUE
)
if "%~1"=="--no-pause" (
set NO_PAUSE=true
goto :PARSER_CONTINUE
)
set SBT_PARAMS=%SBT_PARAMS% %1
:PARSER_CONTINUE
shift
goto :PARSER_LOOP
:PARSER_END
set JVM_PARAMS=%JVM_PARAMS% %LIFT_RUN_MODE%
if %TRY_JREBEL%.==true. (
if exist "%JREBEL_HOME%\jrebel.jar" set JVM_PARAMS=%JVM_PARAMS% -noverify -javaagent:"%JREBEL_HOME%\jrebel.jar" %JREBEL_PLUGINS%
)
set GRUJ_PATH=project\strap\gruj_vs_sbt-launch-0.12.2.jar
set RUN_CMD=java %JVM_PARAMS% -jar %GRUJ_PATH% %LOG_LEVEL% %SBT_PARAMS%
:RUN_LOOP
%RUN_CMD%
if %DO_LOOP%.==true. (
if %NO_PAUSE%.==false. (
echo Press Enter to continue or Press CTRL+C to exit!
pause
)
goto :RUN_LOOP
)
popd
endlocal