2021-05-28 20:35:52 +00:00
|
|
|
@echo off
|
|
|
|
setlocal enabledelayedexpansion
|
|
|
|
|
|
|
|
:: Static Environment Variables
|
|
|
|
set BUILD_OUTPUT_PATH=build\docker
|
|
|
|
set IMAGE_NAME=djhackers/segatools-build:latest
|
|
|
|
set CONTAINER_NAME=segatools-build
|
|
|
|
|
|
|
|
:: Main Execution
|
|
|
|
docker build . -t %IMAGE_NAME%
|
|
|
|
|
|
|
|
if ERRORLEVEL 1 (
|
|
|
|
goto failure
|
|
|
|
)
|
|
|
|
|
2023-02-13 01:45:13 +00:00
|
|
|
docker run -it --rm -v %~dp0:/segatools --name %CONTAINER_NAME% %IMAGE_NAME%
|
2021-05-28 20:35:52 +00:00
|
|
|
|
|
|
|
if ERRORLEVEL 1 (
|
|
|
|
goto failure
|
|
|
|
)
|
|
|
|
|
2023-02-13 01:45:13 +00:00
|
|
|
docker image rm -f %IMAGE_NAME%
|
2021-05-28 20:35:52 +00:00
|
|
|
|
|
|
|
goto success
|
|
|
|
|
|
|
|
:failure
|
|
|
|
echo segatools Docker build FAILED!
|
|
|
|
goto finish
|
|
|
|
|
|
|
|
:success
|
|
|
|
echo segatools Docker build completed successfully.
|
|
|
|
goto finish
|
|
|
|
|
|
|
|
:finish
|
|
|
|
pause
|