Skip to content

Instantly share code, notes, and snippets.

@blomma
blomma / aerobuild.sh
Created September 10, 2012 15:42 — forked from idoru/aerobuild.sh
bump version, build & archive, tag git version and publish iOS app builds to testflight
#!/bin/sh
#
# aerobuild.sh
#
# What does this do?
# ==================
# - Bumps build numbers in your project using agvtool
# - Builds your app and packages it for testing/ad-hoc distribution
# - Commits build number changes to git
#!/usr/bin/env ruby
#
# Git commit-msg hook. If your branch name is in the form "t123", automatically
# adds "Refs #123." to commit messages unless they mention "#123" already.
#
# By Henrik Nyh <http://henrik.nyh.se> 2009-09-10 under the MIT License.
#
#
# Install:
#
#!/bin/bash
# --- Version history ---
# 0.4: added variable to store file path, and $2 for base file name
# added variable to store desired reporting interval
# 0.3: added $1 to send in process ID at run time.
# 0.2: switched to $SECONDS for the loop. works.
# 0.1: didn't work well at all.
# --- Version history ---
# Usage: cputrack [PID] [filename]
Argh, brainfart, I somehow completely missed the third paragraph :-(
The “git svn branch” part is really just the branch creation (like “svn cp trunk branch”). After that, you should have a new remote tracking branch (see “git branch -r”) and can rebase your stuff onto it, like:
git rebase –onto $new_svn_branch master $git_branch
What that does is that it turns the commits in the range master..$git_branch into patches, applies them on top of $new_svn_branch and then updates $git_branch to reference the result.
And then “git svn dcommit -n” should tell you that it’s going to dcommit your stuff to the new svn branch.
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by git-commit with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git-rev-parse --verify HEAD > /dev/null