[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_1RC1-207-g6d5a1c3

Michal Čihař nijel at users.sourceforge.net
Thu Mar 11 16:51:04 CET 2010


The branch, master has been updated
       via  6d5a1c3c29d9825ec596894c4aa5f589d20badeb (commit)
       via  93b19bded89932b51c2102e11b79111bef925bdb (commit)
       via  17147737eb8fa366d17ab85f52cf3ba2bf875841 (commit)
       via  39c0280bf3c68bf49b390b6d9e282d8643e1dfb8 (commit)
       via  f61b39fd2f5cd6d181780992cd1580bfb0101609 (commit)
      from  aebacd260f911b8d8261883493c4b111d8969c10 (commit)


- Log -----------------------------------------------------------------
commit 6d5a1c3c29d9825ec596894c4aa5f589d20badeb
Author: Michal Čihař <mcihar at novell.com>
Date:   Thu Mar 11 16:50:15 2010 +0100

    Add script for automatically uploading a release.

commit 93b19bded89932b51c2102e11b79111bef925bdb
Author: Michal Čihař <mcihar at novell.com>
Date:   Thu Mar 11 16:49:58 2010 +0100

    Proper path to release notes.

commit 17147737eb8fa366d17ab85f52cf3ba2bf875841
Author: Michal Čihař <mcihar at novell.com>
Date:   Thu Mar 11 16:40:06 2010 +0100

    Add support for tagging a release.

commit 39c0280bf3c68bf49b390b6d9e282d8643e1dfb8
Author: Michal Čihař <mcihar at novell.com>
Date:   Thu Mar 11 16:32:37 2010 +0100

    Update script for creating releases to work with Git.

commit f61b39fd2f5cd6d181780992cd1580bfb0101609
Author: Michal Čihař <mcihar at novell.com>
Date:   Thu Mar 11 16:15:50 2010 +0100

    Remove snapshot mode.
    
    It is not used anyway and just complicates the script.

-----------------------------------------------------------------------

Summary of changes:
 scripts/create-release.sh |  159 +++++++++++++++++++++++++++------------------
 scripts/upload-release    |   31 +++++++++
 2 files changed, 126 insertions(+), 64 deletions(-)
 create mode 100755 scripts/upload-release

diff --git a/scripts/create-release.sh b/scripts/create-release.sh
index 2c42b95..547dd1d 100755
--- a/scripts/create-release.sh
+++ b/scripts/create-release.sh
@@ -4,42 +4,74 @@
 # vim: expandtab sw=4 ts=4 sts=4:
 #
 
+# Fail on undefined variables
+set -u
+# Fail on failure
+set -e
+
 KITS="all-languages english"
 COMPRESSIONS="zip-7z tbz tgz 7z"
 
-if [ $# = 0 ]
+if [ $# -lt 2 ]
 then
   echo "Usages:"
-  echo "  create-release.sh <version> [from_branch]"
-  echo "  create-release.sh snapshot [sf]"
-  echo "  (no spaces allowed!)"
+  echo "  create-release.sh <version> <from_branch> [--tag]"
+  echo ""
+  echo "If --tag is specified, relase tag is automatically created"
   echo ""
   echo "Examples:"
-  echo "  create-release.sh 2.9.0-rc1 branches/QA_2_9"
-  echo "  create-release.sh 2.9.0 tags/RELEASE_2_9_0"
+  echo "  create-release.sh 2.9.0-rc1 QA_2_9"
+  echo "  create-release.sh 2.9.0 MAINT_2_9_0 --tag"
   exit 65
 fi
 
-branch='trunk'
 
-if [ "$1" = "snapshot" ] ; then
-    mode="snapshot"
-    date_snapshot=`date +%Y%m%d-%H%M%S`
-    target=$date_snapshot
-else
-    if [ "$#" -ge 2 ] ; then
-        branch="$2"
-    fi
-    target="$1"
-    cat <<END
+# Read required parameters
+version=$1
+shift
+branch=$1
+shift
+
+# 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
+git checkout $branch
+
+# Check release version
+if ! grep -q "'PMA_VERSION', '$version'" libraries/Config.class.php ; then
+    echo "There seems to be wrong version in libraries/Config.class.php!"
+    exit 2
+fi
+if ! grep -q "phpMyAdmin $version - Documentation" Documentation.html ; then
+    echo "There seems to be wrong version in Documentation.html"
+    exit 2
+fi
+if ! grep -q "phpMyAdmin $version - Official translators" translators.html ; then
+    echo "There seems to be wrong version in translators.html"
+    exit 2
+fi
+if ! grep -q "Version $version\$" README ; then
+    echo "There seems to be wrong version in README"
+    exit 2
+fi
+
+cat <<END
 
 Please ensure you have:
   1. incremented rc count or version in subversion :
      - in libraries/Config.class.php PMA_Config::__constructor() the line
-          " \$this->set( 'PMA_VERSION', '$1' ); "
+          " \$this->set( 'PMA_VERSION', '$version' ); "
      - in Documentation.html the 2 lines
-          " <title>phpMyAdmin $1 - Documentation</title> "
-          " <h1>phpMyAdmin $1 Documentation</h1> "
+          " <title>phpMyAdmin $version - Documentation</title> "
+          " <h1>phpMyAdmin $version Documentation</h1> "
      - in translators.html
      - in README
   2. checked that all language files are valid (use
@@ -47,58 +79,36 @@ Please ensure you have:
 
 Continue (y/n)?
 END
-    read do_release
+read do_release
 
-    if [ "$do_release" != 'y' ]; then
-        exit
-    fi
+if [ "$do_release" != 'y' ]; then
+    exit 100
 fi
 
-if [ "$mode" = "snapshot" -a "$2" = "sf" ] ; then
-    # Goto project dir
-    cd /home/groups/p/ph/phpmyadmin/htdocs
-
-    # Keep one previous version of the cvs directory
-    if [ -e svn-prev ] ; then
-        rm -rf svn-prev
-    fi
-    mv svn svn-prev
-fi
-
-# Do SVNcheckout
-mkdir -p ./svn
-cd svn
-
-echo "Exporting repository from subversion"
-
-svn export -q https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/$branch/phpMyAdmin
-
-if [ $? -ne 0 ] ; then
-    echo "Subversion checkout failed, bailing out"
-    exit 2
-fi
 
 # Cleanup release dir
-LC_ALL=C date -u > phpMyAdmin/RELEASE-DATE-${target}
+LC_ALL=C date -u > RELEASE-DATE-${version}
 
 # Building Documentation.txt
-LC_ALL=C w3m -dump phpMyAdmin/Documentation.html > phpMyAdmin/Documentation.txt
+LC_ALL=C w3m -dump Documentation.html > Documentation.txt
 
 # Remove test directory from package to avoid Path disclosure messages
 # if someone runs /test/wui.php and there are test failures
-rm -rf phpMyAdmin/test
+rm -rf test
+
+# Remove git metadata
+rm -rf .git
 
-# Renaming directory
-mv phpMyAdmin phpMyAdmin-$target
+cd ..
 
 # Prepare all kits
 for kit in $KITS ; do
     # Copy all files
-	name=phpMyAdmin-$target-$kit
-	cp -r phpMyAdmin-$target $name
+	name=phpMyAdmin-$version-$kit
+	cp -r phpMyAdmin-$version $name
 
 	# Cleanup translations
-    cd phpMyAdmin-$target-$kit
+    cd phpMyAdmin-$version-$kit
     scripts/lang-cleanup.sh $kit
     cd ..
 
@@ -141,10 +151,7 @@ for kit in $KITS ; do
 done
 
 # Cleanup
-rm -rf phpMyAdmin-${target}
-
-if [ "$mode" != "snapshot" ]
-then
+rm -rf phpMyAdmin-${version}
 
 
 echo ""
@@ -155,19 +162,45 @@ echo "------"
 
 ls -la *.gz *.zip *.bz2 *.7z
 
+cd ..
+
+
+if [ $# -gt 0 ] ; then
+    echo
+    echo "Additional tasks:"
+    while [ $# -gt 0 ] ; do
+        param=$1
+        case $1 in
+            --tag)
+                tagname=RELEASE_`echo $version | tr . _ | tr '[:lower:]' '[:upper:]' | tr -d -`
+                echo "* Tagging release as $tagname"
+                git tag -a -m "Released $version" $tagname $branch
+                ;;
+            *)
+                echo "Unknown parameter: $1!"
+                exit 1
+        esac
+        shift
+    done
+    echo
+fi
+
 cat <<END
 
 
 Todo now:
 ---------
+
  1. tag the subversion tree 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
 
- 2. prepare a phpMyAdmin-xxx-notes.html explaining in short the goal of
+ 2. prepare a release/phpMyAdmin-$version-notes.html explaining in short the goal of
     this release and paste into it the ChangeLog for this release
- 3. upload the files and the notes file to SF (procedure explained on the sf.net Project Admin/File Manager help page)
+ 3. upload the files to SF, you can use scripts/upload-release, eg.:
+
+        ./scripts/upload-release \$USER $version release
  4. add SF news item to phpMyAdmin project
  5. announce release on freshmeat (http://freshmeat.net/projects/phpmyadmin/)
  6. send a short mail (with list of major changes) to
@@ -180,7 +213,7 @@ Todo now:
 
  7. increment rc count or version in subversion :
         - in libraries/Config.class.php PMA_Config::__constructor() the line
-              " $this->set( 'PMA_VERSION', '2.7.1-dev' ); "
+              " \$this->set( 'PMA_VERSION', '2.7.1-dev' ); "
         - in Documentation.html the 2 lines
               " <title>phpMyAdmin 2.2.2-rc1 - Documentation</title> "
               " <h1>phpMyAdmin 2.2.2-rc1 Documentation</h1> "
@@ -192,5 +225,3 @@ Todo now:
  9. the end :-)
 
 END
-
-fi
diff --git a/scripts/upload-release b/scripts/upload-release
new file mode 100755
index 0000000..4bcfa5e
--- /dev/null
+++ b/scripts/upload-release
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+set -e
+set -u
+
+if [ $# -lt 2 ] ; then
+    echo 'Usage: upload-release USERNAME VERSION [DIR]'
+    echo 'Must be called in directory with binaries or with path'
+    exit 1
+fi
+USER=$1
+REL=$2
+
+if [ $# -gt 2 ] ; then
+    cd "$3"
+fi
+
+sftp $USER,phpmyadmin at frs.sourceforge.net <<EOT
+cd /home/frs/project/p/ph/phpmyadmin/phpMyAdmin
+mkdir $REL
+cd $REL
+put phpMyAdmin-$REL-all-languages.tar.bz2
+put phpMyAdmin-$REL-english.tar.bz2
+put phpMyAdmin-$REL-all-languages.tar.gz
+put phpMyAdmin-$REL-english.tar.gz
+put phpMyAdmin-$REL-all-languages.zip	
+put phpMyAdmin-$REL-english.zip
+put phpMyAdmin-$REL-all-languages.7z	
+put phpMyAdmin-$REL-english.7z
+EOT
+


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list