-
-
Save onlyyoujack/71abf90b9f1fa1d2558c09039cf98f98 to your computer and use it in GitHub Desktop.
编译把Git的提交次数作为小版本号
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Git 版本数 | |
VERSION_NUMBER=`git rev-list head | sort | wc -l | awk '{print $1}'` | |
#VERSION_HASH=`git rev-list head | head -1` | |
echo $VERSION_NUMBER | |
#echo $VERSION_HASH | |
##加入版本号 | |
##Add Version Num | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${VERSION_NUMBER}" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment