Skip to content

Instantly share code, notes, and snippets.

View edwardmp's full-sized avatar
🚀

Edward Poot edwardmp

🚀
View GitHub Profile
@edwardmp
edwardmp / gist:86f912c98a3c96411714
Last active August 29, 2015 14:16
Xcode 6 automatic build number updating based on amount of Git commits
buildPlist="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
PlistBuddy="/usr/libexec/PlistBuddy"
git=`sh /etc/profile; which git`
CFBundleVersion=`"$git" rev-list --all | wc -l`
$PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "$buildPlist"
#$PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "$INFOPLIST_FILE"
$PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "${DWARF_DSYM_FOLDER_PATH}/${WRAPPER_NAME}.dSYM/Contents/Info.plist"

Keybase proof

I hereby claim:

  • I am edwardmp on github.
  • I am edwardmp (https://keybase.io/edwardmp) on keybase.
  • I have a public key whose fingerprint is 9385 200B 3AF9 0754 6D99 A7BE A261 8AC5 7780 0BF6

To claim this, I am signing this object:

@edwardmp
edwardmp / serverify.sh
Created June 11, 2014 12:36
Serverify: start a webserver serving the files in the directory you are currently in. Add this to your ~/.bash_profile and restart terminal.
alias serverify='python -m SimpleHTTPServer'
@edwardmp
edwardmp / loc.sh
Created June 11, 2014 11:33
Place this line in your ~/bash_profile. Restart Terminal and type loc in a Xcode project. It will return the lines of code, excluding Pods.
alias loc='find . ! -path "./Pods/*" "(" -name "*.m" -or -name "*.mm" -or -name "*.cpp" ")" -print0 | xargs -0 wc -l'