2013-10-11 08:31:13 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-11-27 02:39:26 +00:00
|
|
|
git_version=$(/usr/bin/git describe --tags | sed -e 's/k54-//')
|
2020-03-01 23:09:30 +00:00
|
|
|
short_version=${git_version%-*}
|
2013-10-11 08:31:13 +00:00
|
|
|
|
|
|
|
build_time=$(date)
|
|
|
|
|
2015-08-01 06:48:08 +00:00
|
|
|
echo "git_version=${git_version}"
|
2020-03-01 23:09:30 +00:00
|
|
|
echo "short_version=${short_version}"
|
2013-10-13 00:53:59 +00:00
|
|
|
echo "build_time=${build_time}"
|
|
|
|
|
|
|
|
info_plist="${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}"
|
2022-06-21 13:27:29 +00:00
|
|
|
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion '${short_version}'" "${info_plist}"
|
2020-03-01 23:09:30 +00:00
|
|
|
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString '${short_version}'" "${info_plist}"
|
2022-06-21 13:27:29 +00:00
|
|
|
/usr/libexec/PlistBuddy -c "Add :GitVersion string '${git_version}'" "${info_plist}"
|
2013-10-11 08:31:13 +00:00
|
|
|
/usr/libexec/PlistBuddy -c "Add :BuildTime date '${build_time}'" "${info_plist}"
|
|
|
|
|
2013-10-13 00:53:59 +00:00
|
|
|
exit 0
|