Record git revision in build and update deploy Makefile

This commit is contained in:
Christoph Haas 2026-09-05 13:15:29 +02:00
parent 7fff0a6dbf
commit 81b87f2cc3
2 changed files with 12 additions and 7 deletions

View file

@ -5,6 +5,7 @@
ARG RUBY_VERSION=3.4.7
ARG NODE_VERSION=22.16.0
ARG BUN_VERSION=1.3.9
ARG GIT_REV=unknown
# --- Stage 1: Grab Node.js Binaries ---
# We use the official image as a source for pre-compiled binaries
@ -78,8 +79,11 @@ RUN groupadd --system --gid 1000 rails && \
useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \
chown -R rails:rails db log tmp public
# Create versioninfo with build timestamp
RUN date +"%Y-%m-%d %H:%M:%S %Z" > public/versioninfo
# Redeclare so it is in scope in this final stage
ARG GIT_REV=unknown
# Create versioninfo with git revision and build timestamp
RUN printf 'git-rev: %s\nbuilt-at: %s\n' "$GIT_REV" "$(date +'%Y-%m-%d %H:%M:%S %Z')" > public/versioninfo
USER 1000:1000