Skip to content

Instantly share code, notes, and snippets.

View andreacfm's full-sized avatar

Andrea Campolonghi andreacfm

View GitHub Profile
@andreacfm
andreacfm / gist:7689669
Last active December 29, 2015 15:19 — forked from c0diq/gist:2213492
Increment the build number when creating an AdHoc build
#!/bin/bash
if [[ $CONFIGURATION == *AdHoc* ]]; then
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" ${PROJECT_DIR}/${INFOPLIST_FILE})
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" ${PROJECT_DIR}/${INFOPLIST_FILE}
fi
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
# Inspired by original script by incanus:
# https://gist.github.com/1186990
#
# Rewritten by martijnthe:
# https://gist.github.com/1379127
#
#!/bin/sh
# Script for managing build and version numbers using git and agvtool.
# Change log:
# v1.0 18-Jul-11 First public release.
# v1.1 29-Sep-12 Launch git, agvtool via xcrun.
version() {