mirror of
https://github.com/mas-cli/mas
synced 2024-11-24 12:33:08 +00:00
15 lines
345 B
Bash
Executable file
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}"
|