Files
thebet365/docs/docker/build-and-export-player-theme-3.bat

31 lines
880 B
Batchfile

@echo off
REM Build and export theme-3 player theme only.
REM Automatically switches to 'theme-3' branch, builds, and restores original branch.
REM Usage: docs\docker\build-and-export-player-theme-3.bat [options]
cd /d "%~dp0..\.."
set "BRANCH=theme-3"
set "TAG=theme-3"
set "ORIGINAL_BRANCH="
for /f "delims=" %%B in ('git rev-parse --abbrev-ref HEAD 2^>nul') do set "ORIGINAL_BRANCH=%%B"
if not defined ORIGINAL_BRANCH (
echo ERROR: Cannot determine current Git branch.
exit /b 1
)
echo [INFO] Switching to branch %BRANCH%...
git checkout %BRANCH% >nul 2>&1
if errorlevel 1 (
echo [ERROR] Cannot switch to branch %BRANCH%
exit /b 1
)
call docs\docker\build-and-export-images.bat --service player --tag %TAG% %*
set "BUILD_STATUS=%ERRORLEVEL%"
echo [INFO] Restoring original branch: %ORIGINAL_BRANCH%
git checkout %ORIGINAL_BRANCH% >nul 2>&1
exit /b %BUILD_STATUS%