Files
immichframe-helm/scripts/chart-version.sh
T
feedc0de 14ef867b5a
Validate, publish and promote Helm chart / Publish and promote chart (push) Successful in 30s
Validate, publish and promote Helm chart / Validate chart (push) Successful in 34s
Tag ImmichFrame chart from upstream release
2026-10-19 21:02:13 +02:00

17 lines
620 B
Bash
Executable File

#!/bin/sh
set -eu
description=$(git describe --tags --long --match 'v[0-9]*' --dirty)
case "$description" in
*-dirty) echo "refusing to package a dirty tree" >&2; exit 1 ;;
esac
version=${description#v}
case "$version" in
*-0-g*) version=${version%%-0-g*} ;;
esac
# Upstream uses four numeric components (for example v1.0.39.0), whereas
# Helm chart versions must be SemVer. Keep the upstream Git tag verbatim and
# encode its fourth component as a SemVer prerelease identifier.
version=$(printf '%s\n' "$version" | sed -E 's/^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(-.*)?$/\1.\2.\3-\4\5/')
printf '%s\n' "$version"