Backend_Fix #105
+22
-7
@@ -139,14 +139,21 @@ if %errorlevel% neq 0 (
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo [INFO] Step 3/7: Building Docker images from main branch...
|
echo [INFO] Step 3/7: Building Docker images from %CURRENT_BRANCH% branch...
|
||||||
|
|
||||||
REM Temporarily checkout docker-compose files from main to build
|
REM Switch back to current branch to build with latest code
|
||||||
echo [INFO] Checking out docker-compose files from main...
|
echo [INFO] Switching back to %CURRENT_BRANCH% to build images...
|
||||||
git show main:SerpentRace_Docker/docker-compose.prod.yml > SerpentRace_Docker\docker-compose.prod.yml.temp
|
|
||||||
if %errorlevel% neq 0 (
|
|
||||||
echo [ERROR] docker-compose.prod.yml not found in main branch
|
|
||||||
git checkout %CURRENT_BRANCH%
|
git checkout %CURRENT_BRANCH%
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo [ERROR] Failed to switch back to %CURRENT_BRANCH%
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
REM Copy docker-compose file for building
|
||||||
|
echo [INFO] Checking out docker-compose files...
|
||||||
|
git show %CURRENT_BRANCH%:SerpentRace_Docker/docker-compose.prod.yml > SerpentRace_Docker\docker-compose.prod.yml.temp
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo [ERROR] docker-compose.prod.yml not found in %CURRENT_BRANCH% branch
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -158,7 +165,7 @@ if %errorlevel% neq 0 (
|
|||||||
echo [ERROR] Failed to build Docker images
|
echo [ERROR] Failed to build Docker images
|
||||||
cd ..
|
cd ..
|
||||||
del SerpentRace_Docker\docker-compose.prod.yml.temp
|
del SerpentRace_Docker\docker-compose.prod.yml.temp
|
||||||
git checkout %CURRENT_BRANCH%
|
git checkout deployment
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
cd ..
|
cd ..
|
||||||
@@ -166,6 +173,14 @@ cd ..
|
|||||||
REM Clean up temp file
|
REM Clean up temp file
|
||||||
del SerpentRace_Docker\docker-compose.prod.yml.temp
|
del SerpentRace_Docker\docker-compose.prod.yml.temp
|
||||||
|
|
||||||
|
REM Switch to deployment branch for packaging
|
||||||
|
echo [INFO] Switching to deployment branch for packaging...
|
||||||
|
git checkout deployment
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo [ERROR] Failed to switch to deployment branch
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo [INFO] Step 4/7: Identifying built images...
|
echo [INFO] Step 4/7: Identifying built images...
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user