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>
This commit is contained in:
32
build.bat
32
build.bat
@@ -1 +1,31 @@
|
||||
docker build -t xwindow-korean-dotnet:latest .
|
||||
@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
|
||||
|
||||
Reference in New Issue
Block a user