mirror of
https://gitea.tendokyu.moe/Hay1tsme/segatools.git
synced 2024-11-24 09:30:09 +01:00
Add docker-build.bat for building on Windows with Docker Desktop
Initial contribution by Vincent Kocks. Script simplified to fit the new build setup with a common build/ folder. Build folder can be deleted on every invocation because it will just be copied from the docker container anyway. Co-authored-by: Vincent Kocks <engineering@vingenuity.net>
This commit is contained in:
parent
aecd7aa749
commit
de829d3b8c
40
docker-build.bat
Normal file
40
docker-build.bat
Normal file
@ -0,0 +1,40 @@
|
||||
@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
|
||||
)
|
||||
|
||||
docker create --name %CONTAINER_NAME% %IMAGE_NAME%
|
||||
|
||||
if ERRORLEVEL 1 (
|
||||
goto failure
|
||||
)
|
||||
|
||||
rd /s /q "!BUILD_OUTPUT_PATH!"
|
||||
mkdir "!BUILD_OUTPUT_PATH!"
|
||||
|
||||
docker cp %CONTAINER_NAME%:/segatools/build/zip %BUILD_OUTPUT_PATH%
|
||||
|
||||
docker rm -f %CONTAINER_NAME% > nul
|
||||
|
||||
goto success
|
||||
|
||||
:failure
|
||||
echo segatools Docker build FAILED!
|
||||
goto finish
|
||||
|
||||
:success
|
||||
echo segatools Docker build completed successfully.
|
||||
goto finish
|
||||
|
||||
:finish
|
||||
pause
|
Loading…
Reference in New Issue
Block a user