Files
heartwood/build/version
T
Lorenz Leutgeb c7d71df4ab scripts, build, just: POSIX Compliance
Enforce POSIX shell syntax with ShellCheck using `--shell sh`.
2026-10-30 12:45:40 +01:00

10 lines
268 B
Bash
Executable File

#! /usr/bin/env sh
if ! version="$(git describe --match='releases/*' --candidates=1 2>/dev/null)"; then
echo "fatal: no version tag found by 'git describe'" >&2 ; exit 1
fi
# Remove the `releases/` prefix from version.
version=${version#releases/}
echo "$version"