6 echo 'Usage: create-release.sh dir [--tag] [--upload USERNAME]'
8 echo 'Creates a zip for themes download and optionally tags the git tree and uploads to sf.net'
11 if [ "x$1" = "x-h" -o "x$1" = "x--help" ] ; then
15 if [ $# -eq 0 ] ; then
21 if [ ! -d "$THEME" ] ; then
22 echo "Directory $THEME does not exist!"
31 while [ $# -gt 0 ] ; do
41 if [ -z "$UPLOAD_USER" ] ; then
42 echo "Missing sf.net username for upload!"
49 echo "Unknown parameter: $1"
56 VERSION
=`php -r "include '$THEME/info.inc.php'; echo \\\$theme_full_version;"`
59 echo "Creating release for $THEME $VERSION ($NAME)"
63 rm -rf release
/$NAME* release
/$THEME
65 cp -r $THEME release
/$THEME
69 7za a
-bd -tzip $NAME.
zip $THEME
74 ls -la release
/$NAME.
zip
76 if [ $TAG -eq 1 ] ; then
77 git tag
-a -m "Tagging release of theme $THEME $VERSION" $NAME
80 if [ $UPLOAD -eq 1 ] ; then
81 sftp
$UPLOAD_USER,phpmyadmin@frs.sourceforge.net
<<EOT
82 cd /home/frs/project/p/ph/phpmyadmin/themes