Skip to content

Instantly share code, notes, and snippets.

@jinwoo-lee-github
Created March 23, 2013 14:39
Show Gist options
  • Save jinwoo-lee-github/5227940 to your computer and use it in GitHub Desktop.
Save jinwoo-lee-github/5227940 to your computer and use it in GitHub Desktop.
xcode version from git
INFO_PLIST="${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Info"
GIT_VERSION=$(git --git-dir="${PROJECT_DIR}/.git" --work-tree="${PROJECT_DIR}/" rev-list master | wc -l)
GIT_VERSION=${GIT_VERSION// /}
MD_VERSION="1.05."
VERSION=$MD_VERSION$GIT_VERSION
defaults write $INFO_PLIST CFBundleVersion "$VERSION"
echo "VERSION: ${VERSION}"
echo $INFO_PLIST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment