-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcheck-system.cmd
executable file
·53 lines (46 loc) · 1.54 KB
/
check-system.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
@echo off
CALL :validateDocker
CALL :validateKata web-page-generator-kata web-page-generator "make run"
CALL :validateKata tennis-refactoring-kata tennis-refactoring "make tests"
CALL :validateKata user-registration-refactoring-kata user-registration "make tests"
CALL :validateKata gilded-rose-characterization-testsing gilded-rose-characterization "make run"
CALL :validateKata weather-kata weather-kata "make tests"
CALL :validateKata trip-service-kata trip-service "make tests"
CALL :validateKata trivia-golden-master trivia-golden-master "make run"
CALL :validateKata print-date print-date "make tests"
goto :eof
:validateKata
echo Validating %1...
pushd %1
docker run --rm -v %CD%:/code codiumteam/legacy-training-php:%2 %~3
popd
goto :eof
:validateDocker
echo Validating docker running...
docker ps >NUL: 2>NUL:
IF ERRORLEVEL 1 (
echo Error
echo Are you sure that you have docker running?
goto :eof
) else (
echo "Ok"
)
echo Downloading docker image...
docker pull codiumteam/legacy-training-php:web-page-generator >NUL: 2>NUL:
IF ERRORLEVEL 1 (
echo Error
echo There is a problem downloading the docker image
goto :eof
) else (
echo Ok
)
echo Validating docker mount permissions...
docker run --rm -v "%CD%":/code codiumteam/legacy-training-php:web-page-generator ls >NUL: 2>NUL:
IF ERRORLEVEL 1 (
echo Error
echo Are you sure that you have permissions to mount your volumes?
goto :eof
) else (
echo Ok
)
goto :eof