Fixed build version info generator
parent
e6a2773e8a
commit
ee29955db0
|
@ -2026,8 +2026,8 @@
|
|||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = Scripts/genversion.sh;
|
||||
shellScript = "";
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "${PROJECT_DIR}/Scripts/genversion.sh";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
hg_version=$(hg log -r . --template '{latesttag}-{latesttagdistance}-{node|short}')
|
||||
hg_version=$(/usr/local/bin/hg log -r . --template '{latesttag}-{latesttagdistance}-{node|short}')
|
||||
|
||||
build_time=$(date)
|
||||
|
||||
info_plist="${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/Info.plist"
|
||||
echo "hg_version=${hg_version}"
|
||||
echo "build_time=${build_time}"
|
||||
|
||||
info_plist="${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}"
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion '${hg_version}'" "${info_plist}"
|
||||
/usr/libexec/PlistBuddy -c "Add :BuildTime date '${build_time}'" "${info_plist}"
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue