mas/script/version
2024-03-10 19:33:50 -06:00

15 lines
345 B
Bash
Executable file

#!/bin/bash -ue
#
# script/version
# mas
#
# Displays the current marketing version of mas.
#
if git describe >/dev/null 2>&1; then
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
MAS_VERSION=${MAS_VERSION#v}
echo "${MAS_VERSION}"