Last active
December 22, 2015 22:39
-
-
Save martinrybak/6541065 to your computer and use it in GitHub Desktop.
A build script for Xcode that update build number with the last git commit count and generates appledoc documentation
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
#Update build number with number of git commits if in release mode | |
if [ ${CONFIGURATION} == "Release" ]; then | |
buildNumber=$(git rev-list HEAD | wc -l | tr -d ' ') | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}" | |
fi; | |
#if [ ${CONFIGURATION} == "Release" ]; then | |
APPLEDOC_PATH=`which appledoc` | |
if [ $APPLEDOC_PATH ]; then | |
$APPLEDOC_PATH \ | |
--project-name ${PRODUCT_NAME} \ | |
--project-company "Your Name" \ | |
--company-id "com.yourcompany" \ | |
--output ${PRODUCT_NAME}Docs \ | |
--keep-undocumented-objects \ | |
--keep-undocumented-members \ | |
--keep-intermediate-files \ | |
--no-install-docset \ | |
--no-repeat-first-par \ | |
--no-warn-invalid-crossref \ | |
--exit-threshold 2 \ | |
${PROJECT_DIR}/${PRODUCT_NAME} | |
fi; | |
#fi; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment