Merge branch 'master' into gettext

This commit is contained in:
Michal Čihař
2010-03-24 10:50:11 +01:00

View File

@@ -29,6 +29,24 @@ then
fi 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 # Read required parameters
version=$1 version=$1
shift shift
@@ -57,7 +75,21 @@ if [ "$do_release" != 'y' ]; then
exit 100 exit 100
fi 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 # Checkout branch
ensure_local_branch $branch
git checkout $branch git checkout $branch
# Check release version # Check release version
@@ -78,16 +110,6 @@ if ! grep -q "Version $version\$" README ; then
exit 2 exit 2
fi 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 # Cleanup release dir
LC_ALL=C date -u > RELEASE-DATE-${version} LC_ALL=C date -u > RELEASE-DATE-${version}
@@ -192,11 +214,12 @@ if [ $# -gt 0 ] ; then
echo "* Tagging release as $tagname" echo "* Tagging release as $tagname"
git tag -a -m "Released $version" $tagname $branch git tag -a -m "Released $version" $tagname $branch
if echo $version | grep '[a-z_-]' ; then if echo $version | grep '[a-z_-]' ; then
echo "* Tagging release as TESTING" mark_as_release $branch TESTING
git tag -a -f -m "Released $version" TESTING $branch
else else
echo "* Tagging release as STABLE" # We update both branches here
git tag -a -f -m "Released $version" STABLE $branch # As it does not make sense to have older testing than stable
mark_as_release $branch TESTING
mark_as_release $branch STABLE
fi fi
echo " Dont forget to push tags using: git push --tags" echo " Dont forget to push tags using: git push --tags"
;; ;;
@@ -215,7 +238,7 @@ cat <<END
Todo now: 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: for a plain release or a release candidate:
version 2.7.0 gets two tags: RELEASE_2_7_0 and STABLE 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 version 2.7.1-rc1 gets RELEASE_2_7_1RC1 and TESTING