prplos/scripts/prplos_version.sh
Petr Štetiar 3d1c4efcee
scripts: prplos_version.sh: mark development version as 5.2.0
Development on next prplOS release 5.2.0 started, so lets mark the
version accordingly.

References: PCF-2659
Assisted-by: claude:opus-4-8:1m-context
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
2026-07-06 16:53:19 +02:00

25 lines
562 B
Bash
Executable File

#!/usr/bin/env bash
export LANG=C
export LC_ALL=C
PRPLOS_DEVELOPMENT_VERSION="${PRPLOS_DEVELOPMENT_VERSION:-5.2.0}"
tagged_version() {
local tag
tag=$(git describe --exact-match --tags HEAD 2>/dev/null | sed 's/^prplware-v//')
[ -n "$tag" ] && echo "$tag" && exit
}
development_version() {
local git_hash
git_hash=$(git log --pretty=format:%h -n 1 --abbrev=8 2>/dev/null)
[ -z "$git_hash" ] && git_hash="unknown"
echo "${PRPLOS_DEVELOPMENT_VERSION}-${git_hash}"
}
[ -n "$TOPDIR" ] && cd "$TOPDIR" || exit
tagged_version
development_version