Avoid messing up with working copy more than needed.
This commit is contained in:
@@ -75,6 +75,19 @@ 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
|
ensure_local_branch $branch
|
||||||
git checkout $branch
|
git checkout $branch
|
||||||
@@ -97,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}
|
||||||
|
|
||||||
@@ -198,12 +201,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
|
||||||
mark_as_release $brach TESTING
|
mark_as_release $branch TESTING
|
||||||
else
|
else
|
||||||
# We update both branches here
|
# We update both branches here
|
||||||
# As it does not make sense to have older testing than stable
|
# As it does not make sense to have older testing than stable
|
||||||
mark_as_release $brach TESTING
|
mark_as_release $branch TESTING
|
||||||
mark_as_release $brach STABLE
|
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"
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user