[Phpmyadmin-git] [SCM] phpMyAdmin branch, gettext, updated. RELEASE_3_3_1RC1-832-ga069d4f
Michal Čihař
nijel at users.sourceforge.net
Wed Mar 24 10:50:19 CET 2010
The branch, gettext has been updated
via a069d4f4af3bc61f9d831e054e1f64522c4e587c (commit)
via f9e1592958310191f97def4306d27f695de40245 (commit)
via e438f0ce7068e7af2c1f82e72607eceb09d4f17d (commit)
from f0329dca46ae09e7320fc118dc9364199fd9870d (commit)
- Log -----------------------------------------------------------------
commit a069d4f4af3bc61f9d831e054e1f64522c4e587c
Merge: f0329dca46ae09e7320fc118dc9364199fd9870d f9e1592958310191f97def4306d27f695de40245
Author: Michal Čihař <michal at cihar.com>
Date: Wed Mar 24 10:50:11 2010 +0100
Merge branch 'master' into gettext
-----------------------------------------------------------------------
Summary of changes:
scripts/create-release.sh | 53 ++++++++++++++++++++++++++++++++------------
1 files changed, 38 insertions(+), 15 deletions(-)
diff --git a/scripts/create-release.sh b/scripts/create-release.sh
index 88ea442..3fee3e1 100755
--- a/scripts/create-release.sh
+++ b/scripts/create-release.sh
@@ -29,6 +29,24 @@ then
fi
+# Checks whether remote branch has local tracking branch
+ensure_local_branch() {
+ if ! git branch | grep -q '^..'"$1"'$' ; then
+ git branch --track $1 origin/$1
+ fi
+}
+
+# Marks current head of given branch as head of other branch
+# Used for STABLE/TESTING tracking
+mark_as_release() {
+ branch=$1
+ rel_branch=$2
+ echo "* Marking release as $rel_branch"
+ ensure_local_branch $rel_branch
+ git checkout $rel_branch
+ git merge $branch
+}
+
# Read required parameters
version=$1
shift
@@ -57,7 +75,21 @@ if [ "$do_release" != 'y' ]; then
exit 100
fi
+# Ensure we have tracking branch
+ensure_local_branch $branch
+
+# Create working copy
+mkdir -p release
+workdir=release/phpMyAdmin-$version
+if [ -d $workdir ] ; then
+ echo "Working directory '$workdir' already exists, please move it out of way"
+ exit 1
+fi
+git clone --local . $workdir
+cd $workdir
+
# Checkout branch
+ensure_local_branch $branch
git checkout $branch
# Check release version
@@ -78,16 +110,6 @@ if ! grep -q "Version $version\$" README ; then
exit 2
fi
-# Create working copy
-mkdir -p release
-workdir=release/phpMyAdmin-$version
-if [ -d $workdir ] ; then
- echo "Working directory '$workdir' already exists, please move it out of way"
- exit 1
-fi
-git clone --local . $workdir
-cd $workdir
-
# Cleanup release dir
LC_ALL=C date -u > RELEASE-DATE-${version}
@@ -192,11 +214,12 @@ if [ $# -gt 0 ] ; then
echo "* Tagging release as $tagname"
git tag -a -m "Released $version" $tagname $branch
if echo $version | grep '[a-z_-]' ; then
- echo "* Tagging release as TESTING"
- git tag -a -f -m "Released $version" TESTING $branch
+ mark_as_release $branch TESTING
else
- echo "* Tagging release as STABLE"
- git tag -a -f -m "Released $version" STABLE $branch
+ # We update both branches here
+ # As it does not make sense to have older testing than stable
+ mark_as_release $branch TESTING
+ mark_as_release $branch STABLE
fi
echo " Dont forget to push tags using: git push --tags"
;;
@@ -215,7 +238,7 @@ cat <<END
Todo now:
---------
-1. If not already done, tag the repository with the new revision number
+1. If not already done, tag the repository with the new revision number
for a plain release or a release candidate:
version 2.7.0 gets two tags: RELEASE_2_7_0 and STABLE
version 2.7.1-rc1 gets RELEASE_2_7_1RC1 and TESTING
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list