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