-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.bat
46 lines (38 loc) · 1.06 KB
/
app.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
@ECHO OFF
2>NUL CALL :CASE_%1
IF ERRORLEVEL 1 CALL :DEFAULT_CASE
ECHO Done!
EXIT /B
:CASE_build
ECHO Removing temporary application files...
@RD /S /Q "vendor"
ECHO Building...
docker build -t tristanbettany:cpm .
ECHO Install dependancies...
docker run -it --rm -v %cd%:/app -w /app tristanbettany:cpm composer install
GOTO END_CASE
:CASE_install
ECHO Removing temporary application files...
@RD /S /Q "vendor"
ECHO Install dependancies...
docker run -it --rm -v %cd%:/app -w /app tristanbettany:cpm composer install
GOTO END_CASE
:CASE_update
ECHO Updating dependancies...
docker run -it --rm -v %cd%:/app -w /app tristanbettany:cpm composer update
GOTO END_CASE
:CASE_exec
docker run -it --rm -v %cd%:/app -w /app tristanbettany:cpm php cli %2
GOTO END_CASE
:CASE_destroy
ECHO Destroying...
@RD /S /Q "vendor"
docker stop tristanbettany:cpm
docker rm tristanbettany:cpm
GOTO END_CASE
:DEFAULT_CASE
ECHO Unknown function "%1"
GOTO END_CASE
:END_CASE
VER > NUL
GOTO :EOF