UI fixing
This commit is contained in:
@@ -32,7 +32,58 @@ if ! [[ "$GEOINTEL_APP_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]]
|
||||
echo "Invalid semantic version in VERSION: ${GEOINTEL_APP_VERSION}" >&2
|
||||
exit 2
|
||||
fi
|
||||
GEOINTEL_BUILD_SHA="$(git rev-parse HEAD)"
|
||||
resolve_build_sha() {
|
||||
# 1. Explicit override wins.
|
||||
if [ -n "${GEOINTEL_BUILD_SHA:-}" ]; then
|
||||
printf '%s' "$GEOINTEL_BUILD_SHA"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# 2. Real git checkout.
|
||||
if command -v git >/dev/null 2>&1 && git rev-parse --git-dir >/dev/null 2>&1; then
|
||||
git rev-parse HEAD
|
||||
return 0
|
||||
fi
|
||||
|
||||
# 3. Manually copied tree with a RELEASE_SHA marker file.
|
||||
if [ -f RELEASE_SHA ]; then
|
||||
tr -d '[:space:]' < RELEASE_SHA
|
||||
return 0
|
||||
fi
|
||||
|
||||
# 4. Manually copied tree without git: derive a stable content hash so
|
||||
# an unchanged redeploy reuses the existing immutable image tag.
|
||||
if command -v sha1sum >/dev/null 2>&1; then
|
||||
local tree_hash
|
||||
tree_hash="$(
|
||||
find backend frontend deploy scripts fixtures VERSION \
|
||||
-type f \
|
||||
! -path '*/node_modules/*' \
|
||||
! -path '*/__pycache__/*' \
|
||||
! -path '*/.pytest_cache/*' \
|
||||
! -name '*.pyc' \
|
||||
-print0 2>/dev/null \
|
||||
| sort -z \
|
||||
| xargs -0 sha1sum 2>/dev/null \
|
||||
| sha1sum \
|
||||
| cut -c1-40
|
||||
)" || tree_hash=""
|
||||
if [ -n "$tree_hash" ]; then
|
||||
printf '%s' "$tree_hash"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# 5. Last resort: unique per deploy.
|
||||
printf 'manual%s' "$(date -u +%Y%m%d%H%M%S)"
|
||||
}
|
||||
|
||||
GEOINTEL_BUILD_SHA="$(resolve_build_sha)"
|
||||
if [ -z "$GEOINTEL_BUILD_SHA" ]; then
|
||||
echo "Could not determine a build revision for this deployment." >&2
|
||||
exit 2
|
||||
fi
|
||||
echo "Build revision: ${GEOINTEL_BUILD_SHA}"
|
||||
GEOINTEL_BUILD_TIME="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
||||
GEOINTEL_IMAGE_REPOSITORY="${GEOINTEL_IMAGE_REPOSITORY:-geointel-all-in-one}"
|
||||
if [ "$GEOINTEL_INSTALL_AI" = "true" ]; then
|
||||
@@ -138,14 +189,14 @@ if ! start_image "$GEOINTEL_RELEASE_IMAGE"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -x scripts/live_migration_smoke.sh ]; then
|
||||
if [ -f scripts/live_migration_smoke.sh ]; then
|
||||
if ! LIVE_SMOKE_CONTAINER=geointel bash scripts/live_migration_smoke.sh; then
|
||||
rollback_previous || true
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -x scripts/verify_browser_runtime.sh ]; then
|
||||
if [ -f scripts/verify_browser_runtime.sh ]; then
|
||||
if ! bash scripts/verify_browser_runtime.sh "$FRONTEND_URL"; then
|
||||
rollback_previous || true
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user