Skip to content

Instantly share code, notes, and snippets.

@erenkabakci
Created October 18, 2017 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erenkabakci/dadeb42f5fda17d06f97c088cc8ebc19 to your computer and use it in GitHub Desktop.
Save erenkabakci/dadeb42f5fda17d06f97c088cc8ebc19 to your computer and use it in GitHub Desktop.
Git pre-push hook to remind incrementing the build version
#!/bin/sh
echo " ++++++++ DID YOU INCREASE THE BUILD NUMBER ? ++++++++"
exec < /dev/tty
read input
if [ "$input" == "y" ]; then
exit 0
else
echo "Running hook for build increment"
fastlane increment_build
git add pathToYourProject/pathToYourTarget/Info.plist
git add pathToYourProject/projectName.xcodeproj/project.pbxproj
git commit -m "Increment build number"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment