Browse Source

Change version numbering algorithm

master
Christopher Snowhill 3 weeks ago
parent
commit
5b914831d2
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      Scripts/genversion.sh

+ 4
- 1
Scripts/genversion.sh View File

@@ -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

Loading…
Cancel
Save