Skip to content

Instantly share code, notes, and snippets.

@orip
Created July 30, 2012 10:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orip/3206124 to your computer and use it in GitHub Desktop.
Save orip/3206124 to your computer and use it in GitHub Desktop.
#!/bin/sh
# inspired by http://www.cimgf.com/2011/02/20/revisiting-git-tags-and-building/git_hash=`git rev-parse --short HEAD 2>/dev/null || echo "nohash"`
TARGET_FILE=${PROJECT_TEMP_DIR}/InfoPlist.h
echo "#define GIT_HASH $git_hash" > $TARGET_FILE
touch $INFOPLIST_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment