Files
mfer/bin/gitrev.sh
T
clawbot cbcda41ac1
check / check (push) Waiting to run
Stamp the tag or short commit in a plain docker build (closes #112)
.dockerignore now sends .git but not .git/config, which can hold a
credential and which git describe does not need. The build stage stamps
main.Gitrev from the VERSION build argument when one is given, otherwise
from git describe --tags --always, and fails if .git is present and no
version comes out. script/docker is replaced by the canonical copy,
which passes VERSION; bin/gitrev.sh uses --tags too, so every entrypoint
stamps the same value for a clean commit.

Model: opus-5-5
2026-10-02 04:10:40 +00:00

8 lines
117 B
Bash

#!/bin/bash
#
if [[ ! -z "$GITREV" ]]; then
echo $GITREV
else
git describe --tags --always --dirty=-dirty
fi