mas/script/version

25 lines
484 B
Text
Raw Normal View History

2019-01-13 07:18:35 +00:00
#!/bin/bash -e
#
# script/version
# mas
#
# Displays the current marketing version of mas.
2019-01-13 07:18:35 +00:00
#
# This no longer works with MARKETING_VERSION build setting in Info.plist
# agvtool what-marketing-version -terse1
VERSION=$(git describe --abbrev=0 --tags)
VERSION=${VERSION#v}
2021-06-09 01:56:27 +00:00
SCRIPT_PATH=$(dirname "$(which "$0")")
2021-04-29 05:56:34 +00:00
cat <<EOF >"${SCRIPT_PATH}/../Sources/MasKit/Package.swift"
// Generated by: script/version
enum Package {
static let version = "${VERSION}"
}
EOF
2021-06-09 01:56:27 +00:00
echo "${VERSION}"