mas/script/version

16 lines
345 B
Text
Raw Normal View History

#!/bin/bash -ue
2019-01-13 07:18:35 +00:00
#
# script/version
# mas
#
# Displays the current marketing version of mas.
2019-01-13 07:18:35 +00:00
#
2024-02-18 21:34:47 +00:00
if git describe >/dev/null 2>&1; then
2024-03-11 01:32:02 +00:00
last_tag=$(git describe --abbrev=0 --tags 2>/dev/null || true)
# Use MAS_VERSION environment varible unless unset
MAS_VERSION=${MAS_VERSION:-$last_tag}
fi
2023-11-25 23:04:18 +00:00
MAS_VERSION=${MAS_VERSION#v}
2024-02-19 01:31:00 +00:00
echo "${MAS_VERSION}"