| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 1 | # | 
| Vincent Driessen | 6c2d30b | 2010-01-26 22:18:36 +0100 | [diff] [blame] | 2 | # git-flow -- A collection of Git extensions to provide high-level | 
 | 3 | # repository operations for Vincent Driessen's branching model. | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 4 | # | 
 | 5 | # Original blog post presenting this model is found at: | 
 | 6 | #    http://nvie.com/archives/323 | 
 | 7 | # | 
 | 8 | # Feel free to contribute to this project at: | 
 | 9 | #    http://github.com/nvie/gitflow | 
 | 10 | # | 
 | 11 | # Copyright (c) 2010 by Vincent Driessen | 
 | 12 | # Copyright (c) 2010 by Benedikt Böhm | 
 | 13 | # | 
 | 14 |  | 
| Vincent Driessen | d72e4ac | 2010-02-16 21:33:51 +0100 | [diff] [blame] | 15 | gitflow_require_git_repo | 
| Vincent Driessen | c1598bf | 2010-02-20 16:52:48 +0100 | [diff] [blame] | 16 | gitflow_require_initialized | 
| Vincent Driessen | d72e4ac | 2010-02-16 21:33:51 +0100 | [diff] [blame] | 17 | gitflow_load_settings | 
| Benedikt Böhm | 49dd62b | 2010-01-28 00:51:15 +0100 | [diff] [blame] | 18 | VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag) | 
| Vincent Driessen | c1598bf | 2010-02-20 16:52:48 +0100 | [diff] [blame] | 19 | PREFIX=$(git config --get gitflow.prefix.release) | 
| Benedikt Böhm | 49dd62b | 2010-01-28 00:51:15 +0100 | [diff] [blame] | 20 |  | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 21 | usage() { | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 22 | 	echo "usage: git flow release [list] [-v]" | 
| Vincent Driessen | 170dc74 | 2010-01-28 00:20:51 +0100 | [diff] [blame] | 23 | 	echo "       git flow release start <version>" | 
 | 24 | 	echo "       git flow release finish <version>" | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 25 | 	# TODO | 
 | 26 | 	#echo "" | 
 | 27 | 	#echo "options:" | 
 | 28 | 	#echo "--option    Explanation" | 
 | 29 | 	#echo "" | 
 | 30 | 	#echo "start-only options:" | 
 | 31 | 	#echo "--bump <script>" | 
 | 32 | 	#echo "            Run the given script to auto-update the version number" | 
 | 33 | 	#echo "" | 
 | 34 | 	#echo "finish-only options:" | 
 | 35 | 	#echo "--push      Push to the origin repo when finished" | 
 | 36 | } | 
 | 37 |  | 
| Vincent Driessen | 170dc74 | 2010-01-28 00:20:51 +0100 | [diff] [blame] | 38 | cmd_default() { | 
| Vincent Driessen | b866b01 | 2010-01-28 01:01:53 +0100 | [diff] [blame] | 39 | 	cmd_list "$@" | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 40 | } | 
 | 41 |  | 
| Vincent Driessen | b866b01 | 2010-01-28 01:01:53 +0100 | [diff] [blame] | 42 | cmd_list() { | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 43 | 	DEFINE_boolean verbose false 'verbose (more) output' v | 
 | 44 | 	parse_args "$@" | 
 | 45 |  | 
| Vincent Driessen | f46e290 | 2010-02-15 23:01:52 +0100 | [diff] [blame] | 46 | 	local release_branches | 
 | 47 | 	local current_branch | 
 | 48 | 	local short_names | 
| Vincent Driessen | 21c7aa9 | 2010-02-16 20:57:35 +0100 | [diff] [blame] | 49 | 	release_branches=$(echo "$(gitflow_local_branches)" | grep "^$PREFIX") | 
| Vincent Driessen | 27592dd | 2010-02-06 14:45:39 +0100 | [diff] [blame] | 50 | 	if [ -z "$release_branches" ]; then | 
| Vincent Driessen | 170dc74 | 2010-01-28 00:20:51 +0100 | [diff] [blame] | 51 | 		warn "No release branches exist." | 
 | 52 | 		exit 0 | 
 | 53 | 	fi | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 54 |  | 
| Vincent Driessen | 27592dd | 2010-02-06 14:45:39 +0100 | [diff] [blame] | 55 | 	current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g') | 
| Vincent Driessen | 6884523 | 2010-02-10 00:43:21 +0100 | [diff] [blame] | 56 | 	short_names=$(echo "$release_branches" | sed "s ^$PREFIX  g") | 
| Vincent Driessen | 27592dd | 2010-02-06 14:45:39 +0100 | [diff] [blame] | 57 |  | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 58 | 	# determine column width first | 
| Vincent Driessen | f46e290 | 2010-02-15 23:01:52 +0100 | [diff] [blame] | 59 | 	local width=0 | 
 | 60 | 	local branch | 
| Vincent Driessen | 27592dd | 2010-02-06 14:45:39 +0100 | [diff] [blame] | 61 | 	for branch in $short_names; do | 
| Vincent Driessen | f46e290 | 2010-02-15 23:01:52 +0100 | [diff] [blame] | 62 | 		local len=${#branch} | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 63 | 		width=$(max $width $len) | 
 | 64 | 	done | 
| Vincent Driessen | f46e290 | 2010-02-15 23:01:52 +0100 | [diff] [blame] | 65 | 	width=$(($width+3)) | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 66 |  | 
| Vincent Driessen | f46e290 | 2010-02-15 23:01:52 +0100 | [diff] [blame] | 67 | 	local branch | 
| Vincent Driessen | 27592dd | 2010-02-06 14:45:39 +0100 | [diff] [blame] | 68 | 	for branch in $short_names; do | 
| Vincent Driessen | f46e290 | 2010-02-15 23:01:52 +0100 | [diff] [blame] | 69 | 		local fullname=$PREFIX$branch | 
 | 70 | 		local base=$(git merge-base "$fullname" "$DEVELOP_BRANCH") | 
 | 71 | 		local develop_sha=$(git rev-parse "$DEVELOP_BRANCH") | 
 | 72 | 		local branch_sha=$(git rev-parse "$fullname") | 
| Vincent Driessen | 27592dd | 2010-02-06 14:45:39 +0100 | [diff] [blame] | 73 | 		if [ "$fullname" = "$current_branch" ]; then | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 74 | 			printf "* " | 
 | 75 | 		else | 
 | 76 | 			printf "  " | 
 | 77 | 		fi | 
 | 78 | 		if flag verbose; then | 
 | 79 | 			printf "%-${width}s" "$branch" | 
 | 80 | 			if [ "$branch_sha" = "$develop_sha" ]; then | 
 | 81 | 				printf "(no commits yet)" | 
 | 82 | 			else | 
| Vincent Driessen | f46e290 | 2010-02-15 23:01:52 +0100 | [diff] [blame] | 83 | 				local nicename=$(git rev-parse --short "$base") | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 84 | 				printf "(based on $nicename)" | 
 | 85 | 			fi | 
 | 86 | 		else | 
 | 87 | 			printf "%s" "$branch" | 
 | 88 | 		fi | 
 | 89 | 		echo | 
 | 90 | 	done | 
| Vincent Driessen | 170dc74 | 2010-01-28 00:20:51 +0100 | [diff] [blame] | 91 | } | 
 | 92 |  | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 93 | cmd_help() { | 
 | 94 | 	usage | 
 | 95 | 	exit 0 | 
 | 96 | } | 
 | 97 |  | 
| Vincent Driessen | b866b01 | 2010-01-28 01:01:53 +0100 | [diff] [blame] | 98 | parse_args() { | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 99 | 	# parse options | 
 | 100 | 	FLAGS "$@" || exit $? | 
 | 101 | 	eval set -- "${FLAGS_ARGV}" | 
 | 102 |  | 
 | 103 | 	# read arguments into global variables | 
| Vincent Driessen | c5fcc01 | 2010-02-10 00:18:08 +0100 | [diff] [blame] | 104 | 	VERSION=$1 | 
 | 105 | 	BRANCH=$PREFIX$VERSION | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 106 | } | 
 | 107 |  | 
 | 108 | require_version_arg() { | 
| Vincent Driessen | b866b01 | 2010-01-28 01:01:53 +0100 | [diff] [blame] | 109 | 	if [ "$VERSION" = "" ]; then | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 110 | 		warn "Missing argument <version>" | 
| Vincent Driessen | b866b01 | 2010-01-28 01:01:53 +0100 | [diff] [blame] | 111 | 		usage | 
 | 112 | 		exit 1 | 
 | 113 | 	fi | 
| Vincent Driessen | b866b01 | 2010-01-28 01:01:53 +0100 | [diff] [blame] | 114 | } | 
 | 115 |  | 
| Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 116 | require_base_is_on_develop() { | 
 | 117 | 	if ! git branch --contains "$BASE" 2>/dev/null \ | 
 | 118 | 			| sed 's/[* ] //g' \ | 
 | 119 | 	  		| grep -q "^$DEVELOP_BRANCH\$"; then | 
 | 120 | 		die "fatal: Given base '$BASE' is not a valid commit on '$DEVELOP_BRANCH'." | 
 | 121 | 	fi | 
 | 122 | } | 
 | 123 |  | 
| Vincent Driessen | 6d64d2c | 2010-02-16 06:41:13 +0100 | [diff] [blame] | 124 | require_no_existing_release_branches() { | 
| Vincent Driessen | 21c7aa9 | 2010-02-16 20:57:35 +0100 | [diff] [blame] | 125 | 	local release_branches=$(echo "$(gitflow_local_branches)" | grep "^$PREFIX") | 
| Vincent Driessen | 6d64d2c | 2010-02-16 06:41:13 +0100 | [diff] [blame] | 126 | 	local first_branch=$(echo ${release_branches} | head -n1) | 
 | 127 | 	first_branch=${first_branch#$PREFIX} | 
 | 128 | 	[ -z "$release_branches" ] || \ | 
 | 129 | 		die "There is an existing release branch ($first_branch). Finish that one first." | 
 | 130 | } | 
 | 131 |  | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 132 | cmd_start() { | 
| Vincent Driessen | ca73caf | 2010-02-07 19:46:38 +0100 | [diff] [blame] | 133 | 	DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 134 | 	parse_args "$@" | 
| Vincent Driessen | c5fcc01 | 2010-02-10 00:18:08 +0100 | [diff] [blame] | 135 | 	BASE=${2:-$DEVELOP_BRANCH} | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 136 | 	require_version_arg | 
| Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 137 | 	require_base_is_on_develop | 
| Vincent Driessen | 6d64d2c | 2010-02-16 06:41:13 +0100 | [diff] [blame] | 138 | 	require_no_existing_release_branches | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 139 |  | 
 | 140 | 	# sanity checks | 
| Vincent Driessen | 4838644 | 2010-01-29 10:30:40 +0100 | [diff] [blame] | 141 | 	gitflow_require_clean_working_tree | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 142 | 	gitflow_require_branch_absent "$BRANCH" | 
 | 143 | 	gitflow_require_tag_absent "$VERSION_PREFIX$VERSION" | 
| Vincent Driessen | ca73caf | 2010-02-07 19:46:38 +0100 | [diff] [blame] | 144 | 	if flag fetch; then | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 145 | 		git fetch -q "$ORIGIN" "$DEVELOP_BRANCH" | 
| Vincent Driessen | 2acfffd | 2010-01-29 12:37:22 +0100 | [diff] [blame] | 146 | 	fi | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 147 | 	gitflow_require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH" | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 148 |  | 
 | 149 | 	# create branch | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 150 | 	git checkout -b "$BRANCH" "$BASE" | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 151 |  | 
 | 152 | 	echo | 
 | 153 | 	echo "Summary of actions:" | 
| Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 154 | 	echo "- A new branch '$BRANCH' was created, based on '$BASE'" | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 155 | 	echo "- You are now on branch '$BRANCH'" | 
 | 156 | 	echo | 
 | 157 | 	echo "Follow-up actions:" | 
 | 158 | 	echo "- Bump the version number now!" | 
 | 159 | 	echo "- Start committing last-minute fixes in preparing your release" | 
 | 160 | 	echo "- When done, run:" | 
 | 161 | 	echo | 
| Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 162 | 	echo "     git flow release finish '$VERSION'" | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 163 | 	echo | 
 | 164 | } | 
 | 165 |  | 
 | 166 | cmd_finish() { | 
| Vincent Driessen | ca73caf | 2010-02-07 19:46:38 +0100 | [diff] [blame] | 167 | 	DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F | 
| Vincent Driessen | 1a2868b | 2010-02-07 23:23:16 +0100 | [diff] [blame] | 168 | 	DEFINE_boolean sign false "sign the release tag cryptographically" s | 
 | 169 | 	DEFINE_string signingkey "" "use the given GPG-key for the digital signature (implies -s)" u | 
 | 170 | 	DEFINE_string message "" "use the given tag message" m | 
| Vincent Driessen | ddba2df | 2010-02-19 06:42:18 +0100 | [diff] [blame] | 171 | 	DEFINE_boolean push false "push to $ORIGIN after performing finish" p | 
| Jason L. Shiffer | 6809f0e | 2010-02-18 23:57:08 -0500 | [diff] [blame] | 172 |  | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 173 | 	parse_args "$@" | 
| Vincent Driessen | 3c337fb | 2010-02-04 11:30:18 +0100 | [diff] [blame] | 174 | 	require_version_arg | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 175 |  | 
| Vincent Driessen | 1a2868b | 2010-02-07 23:23:16 +0100 | [diff] [blame] | 176 | 	# handle flags that imply other flags | 
 | 177 | 	if [ "$FLAGS_signingkey" != "" ]; then | 
 | 178 | 		FLAGS_sign=$FLAGS_TRUE | 
 | 179 | 	fi | 
 | 180 |  | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 181 | 	# sanity checks | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 182 | 	gitflow_require_branch "$BRANCH" | 
| Vincent Driessen | 4838644 | 2010-01-29 10:30:40 +0100 | [diff] [blame] | 183 | 	gitflow_require_clean_working_tree | 
| Vincent Driessen | ca73caf | 2010-02-07 19:46:38 +0100 | [diff] [blame] | 184 | 	if flag fetch; then | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 185 | 		git fetch -q "$ORIGIN" "$MASTER_BRANCH" || \ | 
| Vincent Driessen | 1a2868b | 2010-02-07 23:23:16 +0100 | [diff] [blame] | 186 | 		  die "Could not fetch $MASTER_BRANCH from $ORIGIN." | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 187 | 		git fetch -q "$ORIGIN" "$DEVELOP_BRANCH" || \ | 
| Vincent Driessen | 1a2868b | 2010-02-07 23:23:16 +0100 | [diff] [blame] | 188 | 		  die "Could not fetch $DEVELOP_BRANCH from $ORIGIN." | 
| Vincent Driessen | 2acfffd | 2010-01-29 12:37:22 +0100 | [diff] [blame] | 189 | 	fi | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 190 | 	gitflow_require_branches_equal "$MASTER_BRANCH" "$ORIGIN/$MASTER_BRANCH" | 
 | 191 | 	gitflow_require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH" | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 192 |  | 
| Vincent Driessen | 5fa4758 | 2010-02-09 00:31:33 +0100 | [diff] [blame] | 193 | 	# try to merge into master | 
 | 194 | 	# in case a previous attempt to finish this release branch has failed, | 
 | 195 | 	# but the merge into master was successful, we skip it now | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 196 | 	if ! gitflow_is_branch_merged_into "$BRANCH" "$MASTER_BRANCH"; then | 
 | 197 | 		git checkout "$MASTER_BRANCH" || \ | 
| Vincent Driessen | 5fa4758 | 2010-02-09 00:31:33 +0100 | [diff] [blame] | 198 | 		  die "Could not check out $MASTER_BRANCH." | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 199 | 		git merge --no-ff "$BRANCH" || \ | 
| Vincent Driessen | 5fa4758 | 2010-02-09 00:31:33 +0100 | [diff] [blame] | 200 | 		  die "There were merge conflicts." | 
 | 201 | 		  # TODO: What do we do now? | 
 | 202 | 	fi | 
| Vincent Driessen | 1a2868b | 2010-02-07 23:23:16 +0100 | [diff] [blame] | 203 |  | 
| Vincent Driessen | 5fa4758 | 2010-02-09 00:31:33 +0100 | [diff] [blame] | 204 | 	# try to tag the release | 
 | 205 | 	# in case a previous attempt to finish this release branch has failed, | 
 | 206 | 	# but the tag was set successful, we skip it now | 
| Vincent Driessen | f46e290 | 2010-02-15 23:01:52 +0100 | [diff] [blame] | 207 | 	local tagname=$VERSION_PREFIX$VERSION | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 208 | 	if ! gitflow_tag_exists "$tagname"; then | 
| Vincent Driessen | f46e290 | 2010-02-15 23:01:52 +0100 | [diff] [blame] | 209 | 		local opts="-a" | 
| Vincent Driessen | 5fa4758 | 2010-02-09 00:31:33 +0100 | [diff] [blame] | 210 | 		flag sign && opts="$opts -s" | 
 | 211 | 		[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" | 
 | 212 | 		[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" | 
 | 213 | 		git tag $opts "$tagname" || \ | 
 | 214 | 		  die "Tagging failed. Please run finish again to retry." | 
 | 215 | 	fi | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 216 |  | 
| Vincent Driessen | 5fa4758 | 2010-02-09 00:31:33 +0100 | [diff] [blame] | 217 | 	# try to merge into develop | 
 | 218 | 	# in case a previous attempt to finish this release branch has failed, | 
 | 219 | 	# but the merge into develop was successful, we skip it now | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 220 | 	if ! gitflow_is_branch_merged_into "$BRANCH" "$DEVELOP_BRANCH"; then | 
 | 221 | 		git checkout "$DEVELOP_BRANCH" || \ | 
| Vincent Driessen | 5fa4758 | 2010-02-09 00:31:33 +0100 | [diff] [blame] | 222 | 		  die "Could not check out $DEVELOP_BRANCH." | 
| Vincent Driessen | d29e315 | 2010-02-09 00:55:06 +0100 | [diff] [blame] | 223 |  | 
 | 224 | 		# TODO: Actually, accounting for 'git describe' pays, so we should | 
 | 225 | 		# ideally git merge --no-ff $tagname here, instead! | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 226 | 		git merge --no-ff "$BRANCH" || \ | 
| Vincent Driessen | 5fa4758 | 2010-02-09 00:31:33 +0100 | [diff] [blame] | 227 | 		  die "There were merge conflicts." | 
 | 228 | 		  # TODO: What do we do now? | 
 | 229 | 	fi | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 230 |  | 
 | 231 | 	# delete branch | 
| Vincent Driessen | a4dd223 | 2010-02-10 00:34:59 +0100 | [diff] [blame] | 232 | 	git branch -d "$BRANCH" | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 233 |  | 
| Vincent Driessen | ddba2df | 2010-02-19 06:42:18 +0100 | [diff] [blame] | 234 | 	if flag push; then | 
 | 235 | 		git push "$ORIGIN" "$DEVELOP_BRANCH" || \ | 
 | 236 | 			die "Could not push to $DEVELOP_BRANCH from $ORIGIN." | 
 | 237 | 		git push "$ORIGIN" "$MASTER_BRANCH" || \ | 
 | 238 | 			die "Could not push to $MASTER_BRANCH from $ORIGIN." | 
 | 239 | 		git push --tags "$ORIGIN" || \ | 
 | 240 | 			die "Could not push tags to $ORIGIN." | 
 | 241 | 	fi | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 242 |  | 
 | 243 | 	echo | 
 | 244 | 	echo "Summary of actions:" | 
| Benedikt Böhm | 350e715 | 2010-01-26 13:05:05 +0100 | [diff] [blame] | 245 | 	echo "- Latest objects have been fetched from '$ORIGIN'" | 
| Benedikt Böhm | 4a864fb | 2010-01-26 12:59:27 +0100 | [diff] [blame] | 246 | 	echo "- Release branch has been merged into '$MASTER_BRANCH'" | 
| Vincent Driessen | 5fa4758 | 2010-02-09 00:31:33 +0100 | [diff] [blame] | 247 | 	echo "- The release was tagged '$tagname'" | 
| Benedikt Böhm | 4a864fb | 2010-01-26 12:59:27 +0100 | [diff] [blame] | 248 | 	echo "- Release branch has been back-merged into '$DEVELOP_BRANCH'" | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 249 | 	echo "- Release branch '$BRANCH' has been deleted" | 
| Vincent Driessen | ddba2df | 2010-02-19 06:42:18 +0100 | [diff] [blame] | 250 | 	if flag push; then | 
 | 251 | 		echo "- '$DEVELOP_BRANCH', '$MASTER_BRANCH' and tags have been pushed to '$ORIGIN'" | 
 | 252 | 	fi | 
| Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 253 | 	echo | 
 | 254 | } |