2
0

Update CFBundleVersion to just major.minor.build and include the GIT ref elsewhere.

This commit is contained in:
Maarten Billemont 2015-11-06 02:15:58 -05:00
parent b3674e5324
commit 207d6eadd1

View File

@ -37,13 +37,13 @@ setSettingWithTitle() {
description=$(git describe --always --dirty --long --match '*-release') description=$(git describe --always --dirty --long --match '*-release')
version=${description%-g*} version=${description%-g*}
major=${version%%-*} minor=${version##*-} release=${version%%-*} build=${version##*-}
printf -v version '%s.%02d' "$major" "$minor" printf -v version '%s.%d' "$release" "$build"
printf -v commit '%09d' "$((16#${description##*-g}))" printf -v commit '%s' "${description##*-g}"
addPlistWithKey GITDescription string "$description" addPlistWithKey GITDescription string "$description"
setPlistWithKey CFBundleVersion "$version.$commit" setPlistWithKey CFBundleVersion "$version"
setPlistWithKey CFBundleShortVersionString "$version" setPlistWithKey CFBundleShortVersionString "$release"
setSettingWithTitle "Build" "$commit" setSettingWithTitle "Build" "$commit"
setSettingWithTitle "Version" "$version" setSettingWithTitle "Version" "$version"