The branch, master has been updated
       via  657386a0f4b14e7220e32a9f041e00a5267a895e (commit)
      from  34e783554cb5056bdb7ff649a5c1b93d0a93f609 (commit)


- Log -----------------------------------------------------------------
commit 657386a0f4b14e7220e32a9f041e00a5267a895e
Author: Michal Čihař <[email protected]>
Date:   Wed Mar 2 09:59:47 2011 +0100

    Add script for making theme releases

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

Summary of changes:
 create-release.sh |   90 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 90 insertions(+), 0 deletions(-)
 create mode 100755 create-release.sh

diff --git a/create-release.sh b/create-release.sh
new file mode 100755
index 0000000..1660713
--- /dev/null
+++ b/create-release.sh
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+set -e
+
+usage() {
+    echo 'Usage: create-release.sh dir [--tag] [--upload USERNAME]'
+    echo
+    echo 'Creates a zip for themes download and optionally tags the git tree 
and uploads to sf.net'
+}
+
+if [ "x$1" = "x-h" -o "x$1" = "x--help" ] ; then
+    usage
+    exit 0
+fi
+if [ $# -eq 0 ] ; then
+    usage
+    exit 1
+fi
+
+THEME="${1%/}"
+if [ ! -d "$THEME" ] ; then
+    echo "Directory $THEME does not exist!"
+    exit 2
+fi
+
+shift
+
+TAG=0
+UPLOAD=0
+
+while [ $# -gt 0 ] ; do
+    case "$1" in
+        --tag)
+            TAG=1
+            shift
+            ;;
+        --upload)
+            UPLOAD=1
+            shift
+            UPLOAD_USER="$1"
+            if [ -z "$UPLOAD_USER" ] ; then
+                echo "Missing sf.net username for upload!"
+                usage
+                exit 1
+            fi
+            shift
+            ;;
+        *)
+            echo "Unknown parameter: $1"
+            usage
+            exit 1
+            ;;
+    esac
+done
+
+VERSION=`php -r "include '$THEME/info.inc.php'; echo \\\$theme_full_version;"`
+NAME=$THEME-$VERSION
+
+echo "Creating release for $THEME $VERSION ($NAME)"
+
+mkdir -p release
+
+rm -rf release/$NAME* release/$THEME
+
+cp -r $THEME release/$THEME
+
+cd release
+
+7za a -bd -tzip $NAME.zip $THEME
+
+cd ..
+
+echo "Release files:"
+ls -la release/$NAME.zip
+
+if [ $TAG -eq 1 ] ; then
+    git tag -a -m "Tagging release of theme $THEME $VERSION" $NAME
+fi
+
+if [ $UPLOAD -eq 1 ] ; then
+    sftp $UPLOAD_USER,[email protected] <<EOT
+cd /home/frs/project/p/ph/phpmyadmin/themes
+mkdir $THEME
+cd $THEME
+mkdir $VERSION
+cd $VERSION
+put release/$NAME.zip
+EOT
+fi
+


hooks/post-receive
-- 
phpMyAdmin themes

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Phpmyadmin-git mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-git

Reply via email to