Refactor: Improve temporary tag generation for multi-platform builds with consistent timestamps

This commit is contained in:
sHa
2025-09-28 23:20:57 +03:00
parent c18df29848
commit 5399c864a6

View File

@@ -82,12 +82,14 @@ build project="" tag="" local="false":
$runtime rmi "$image_name" 2>/dev/null || true $runtime rmi "$image_name" 2>/dev/null || true
# Build each platform locally with unique temporary tags # Build each platform locally with unique temporary tags
local temp_tags=() temp_tags=()
timestamp=$(date +%s)
for platform in "${PLATFORM_ARRAY[@]}"; do for platform in "${PLATFORM_ARRAY[@]}"; do
echo -e "{{BLUE}}Building for platform: $platform{{NORMAL}}" echo -e "{{BLUE}}Building for platform: $platform{{NORMAL}}"
# Create unique temporary tag for this build # Create unique temporary tag for this build
temp_tag="${image_name}-build-$(date +%s)-${platform//\//-}" temp_tag="${image_name}-build-${timestamp}-${platform//\//-}"
temp_tags+=("$temp_tag") temp_tags+=("$temp_tag")
$runtime buildx build \ $runtime buildx build \