Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
chore: use buildtime from .arcane.json
Kyle Mendellf22162f0750a
diff --git a/Justfile b/Justfileindex a47e3a3c1..9ee69f0d8 100644--- a/Justfile+++ b/Justfile@@ -566,10 +566,12 @@ _utils-hotfix:fiif [ "$TEST" == true ]; then+ BUILD_TIME=$(date -u '+%Y-%m-%dT%H:%M:%SZ')echo ""echo "Test mode enabled: no changes will be made."echo "Would create or reuse release branch: ${RELEASE_BRANCH}"echo "Would cherry-pick selected commits from main."+ echo "Would update .arcane.json to version ${NEW_VERSION}, revision <release-branch-head>, and buildTime ${BUILD_TIME}."echo "Would generate changelog for ${NEW_TAG} and tag release."echo "Would update main to version ${NEW_VERSION} after release."exit 0@@ -708,10 +710,11 @@ _utils-hotfix:echo ""echo -e "${BLUE}Finalizing hotfix release ${NEW_TAG}...${NC}"- # Update .arcane.json file with the new version and revision- LATEST_REVISION=$(git rev-parse HEAD)- jq --arg version "$NEW_VERSION" --arg revision "$LATEST_REVISION" \- '.version = $version | .revision = $revision' .arcane.json > .arcane_tmp.json && mv .arcane_tmp.json .arcane.json+ # Update .arcane.json file with the new version, revision, and build time+ LATEST_REVISION=$(git rev-parse HEAD)+ BUILD_TIME=$(date -u '+%Y-%m-%dT%H:%M:%SZ')+ jq --arg version "$NEW_VERSION" --arg revision "$LATEST_REVISION" --arg build_time "$BUILD_TIME" \+ '.version = $version | .revision = $revision | .buildTime = $build_time' .arcane.json > .arcane_tmp.json && mv .arcane_tmp.json .arcane.jsongit add .arcane.json# Update version in frontend/package.json@@ -788,9 +791,9 @@ _utils-hotfix:git checkout maingit pull origin main --quiet- # Update .arcane.json file with the new version and revision- jq --arg version "$NEW_VERSION" --arg revision "$LATEST_REVISION" \- '.version = $version | .revision = $revision' .arcane.json > .arcane_tmp.json && mv .arcane_tmp.json .arcane.json+ # Update .arcane.json file with the new version, revision, and build time+ jq --arg version "$NEW_VERSION" --arg revision "$LATEST_REVISION" --arg build_time "$BUILD_TIME" \+ '.version = $version | .revision = $revision | .buildTime = $build_time' .arcane.json > .arcane_tmp.json && mv .arcane_tmp.json .arcane.json# Update version in frontend/package.jsonjq --arg new_version "$NEW_VERSION" '.version = $new_version' frontend/package.json > frontend/package_tmp.json && mv frontend/package_tmp.json frontend/package.json@@ -978,10 +981,11 @@ release *args:LATEST_REVISION=$(git rev-parse HEAD)if [ "$TEST" == false ]; then- # Update .arcane.json file with the new version and revision+ # Update .arcane.json file with the new version, revision, and build timeecho "Updating .arcane.json file..."- jq --arg version "$NEW_VERSION" --arg revision "$LATEST_REVISION" \- '.version = $version | .revision = $revision' .arcane.json > .arcane_tmp.json && mv .arcane_tmp.json .arcane.json+ BUILD_TIME=$(date -u '+%Y-%m-%dT%H:%M:%SZ')+ jq --arg version "$NEW_VERSION" --arg revision "$LATEST_REVISION" --arg build_time "$BUILD_TIME" \+ '.version = $version | .revision = $revision | .buildTime = $build_time' .arcane.json > .arcane_tmp.json && mv .arcane_tmp.json .arcane.jsongit add .arcane.json# Update version in frontend/package.json@@ -1031,7 +1035,8 @@ release *args:echo "Release process complete. New version: $NEW_VERSION"elseecho "Test mode: skipping confirmation prompt and all write operations."- echo "Would update .arcane.json to version $NEW_VERSION and revision $LATEST_REVISION"+ BUILD_TIME=$(date -u '+%Y-%m-%dT%H:%M:%SZ')+ echo "Would update .arcane.json to version $NEW_VERSION, revision $LATEST_REVISION, and buildTime $BUILD_TIME"echo "Would update frontend/package.json to version $NEW_VERSION"echo "Generating changelog preview (no file write)..."CHANGELOG=$(git cliff $CLIFF_VERBOSE --github-token=$(gh auth token) --tag "v$NEW_VERSION" --unreleased)diff --git a/docker/Dockerfile b/docker/Dockerfileindex ddfb452b8..97744dfdb 100644--- a/docker/Dockerfile+++ b/docker/Dockerfile@@ -31,6 +31,7 @@ ARG TARGETVARIANTARG BUILD_TAGSARG VERSION="dev"ARG REVISION="unknown"+ARG BUILD_TIME="unknown"WORKDIR /buildRUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl git tzdata jq \@@ -49,7 +50,7 @@ COPY --from=frontend-builder /build/frontend/dist ./frontend/distRUN --mount=type=cache,target=/root/.cache/go-build \if [ "${VERSION}" = "dev" ]; then VERSION=$(jq -r '.version // "dev"' ../arcane.json); fi && \if [ "${REVISION}" = "unknown" ]; then REVISION=$(jq -r '.revision // "unknown"' ../arcane.json); fi && \- BUILD_TIME=$(date -u '+%Y-%m-%dT%H:%M:%SZ') && \+ if [ "${BUILD_TIME}" = "unknown" ]; then BUILD_TIME=$(jq -r '.buildTime // "unknown"' ../arcane.json); fi && \export GOARCH="${TARGETARCH}" && \if [ "${TARGETARCH}" = "arm" ]; then \GOARM="${TARGETVARIANT#v}"; \diff --git a/docker/Dockerfile-agent b/docker/Dockerfile-agentindex d8c26935d..73f0231b7 100644--- a/docker/Dockerfile-agent+++ b/docker/Dockerfile-agent@@ -8,6 +8,7 @@ ARG TARGETVARIANTARG BUILD_TAGS="exclude_frontend"ARG VERSION="dev"ARG REVISION="unknown"+ARG BUILD_TIME="unknown"WORKDIR /buildRUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates tzdata curl jq \@@ -26,7 +27,7 @@ COPY .arcane.json ../arcane.jsonRUN --mount=type=cache,target=/root/.cache/go-build \if [ "${VERSION}" = "dev" ]; then VERSION=$(jq -r '.version // "dev"' ../arcane.json); fi && \if [ "${REVISION}" = "unknown" ]; then REVISION=$(jq -r '.revision // "unknown"' ../arcane.json); fi && \- BUILD_TIME=$(date -u '+%Y-%m-%dT%H:%M:%SZ') && \+ if [ "${BUILD_TIME}" = "unknown" ]; then BUILD_TIME=$(jq -r '.buildTime // "unknown"' ../arcane.json); fi && \export GOARCH="${TARGETARCH}" && \if [ "${TARGETARCH}" = "arm" ]; then \GOARM="${TARGETVARIANT#v}"; \