Files
xwindow-korean/build.bat
chiDT 72001103cd Enhance build scripts with datetime versioning
- Add datetime-based version tagging (YYYYMMDD_HHMMSS format)
- Support both automatic versioning and manual version override
- Build with both latest and version tags simultaneously
- Update both Linux (.sh) and Windows (.bat) build scripts
- Add detailed build output with next steps guidance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 21:25:04 +09:00

32 lines
966 B
Batchfile

@echo off
REM Docker 이미지 빌드 배치 파일
setlocal enabledelayedexpansion
set IMAGE_NAME=xwindow-korean-dotnet
REM 버전 태그 설정 (날짜시간 기반 또는 인자로 받기)
if not "%1"=="" (
set VERSION=%1
) else (
for /f "tokens=2-4 delims=/ " %%a in ('date /t') do set DATE=%%c%%a%%b
for /f "tokens=1-2 delims=: " %%a in ('time /t') do set TIME=%%a%%b
set TIME=!TIME: =0!
set VERSION=!DATE!_!TIME!
)
echo 🐳 Building Docker image: %IMAGE_NAME%:latest and %IMAGE_NAME%:!VERSION!
REM 빌드 시작 (latest와 버전 태그 동시 적용)
docker build -t %IMAGE_NAME%:latest -t %IMAGE_NAME%:!VERSION! .
echo ✅ Build completed successfully!
echo 🏷️ Tagged as:
echo - %IMAGE_NAME%:latest
echo - %IMAGE_NAME%:!VERSION!
echo 📋 Next steps:
echo - Test: docker run -p 3389:3389 %IMAGE_NAME%:!VERSION!
echo - Push both tags: docker push %IMAGE_NAME%:latest ^&^& docker push %IMAGE_NAME%:!VERSION!
pause