From 5b914831d2e403109e4363f6aa6abe36e78e18bb Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 1 Mar 2020 15:09:30 -0800 Subject: [PATCH] Change version numbering algorithm --- Scripts/genversion.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Scripts/genversion.sh b/Scripts/genversion.sh index 016095c84..d2793f71f 100755 --- a/Scripts/genversion.sh +++ b/Scripts/genversion.sh @@ -1,14 +1,17 @@ #!/bin/sh -git_version=$(/usr/bin/git describe --tags) +git_version=$(/usr/bin/git describe --tags --first-parent | sed -e 's/k54-//') +short_version=${git_version%-*} build_time=$(date) echo "git_version=${git_version}" +echo "short_version=${short_version}" echo "build_time=${build_time}" info_plist="${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}" /usr/libexec/PlistBuddy -c "Set :CFBundleVersion '${git_version}'" "${info_plist}" +/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString '${short_version}'" "${info_plist}" /usr/libexec/PlistBuddy -c "Add :BuildTime date '${build_time}'" "${info_plist}" exit 0