[Scummvm-cvs-logs] scummvm master -> d2ef695e4a9c125eb00a99584eb8ee15e02d9d4e

sev- sev at scummvm.org
Sun Nov 15 13:23:52 CET 2015


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
546ba3c09b DEVTOOLS: Rewrote dist-scummsm.sh tool to support git
d2ef695e4a DEVTOOLS: Package release tarballs with xz also


Commit: 546ba3c09bf6975d051bc05be91783ca7f1bed3e
    https://github.com/scummvm/scummvm/commit/546ba3c09bf6975d051bc05be91783ca7f1bed3e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-15T13:17:31+01:00

Commit Message:
DEVTOOLS: Rewrote dist-scummsm.sh tool to support git

Changed paths:
    devtools/dist-scummvm.sh



diff --git a/devtools/dist-scummvm.sh b/devtools/dist-scummvm.sh
index ac411c5..cc33032 100755
--- a/devtools/dist-scummvm.sh
+++ b/devtools/dist-scummvm.sh
@@ -4,6 +4,7 @@
 #
 # Largely based on dist-fink.sh, Copyright (c) 2001 Christoph Pfisterer.
 # Modified to use Subversion instead of CVS by Max Horn in 2007.
+# Modified to use git by Eugene Sandulenko in 2015.
 #
 # ScummVM is the legal property of its developers, whose names
 # are too numerous to list here. Please refer to the COPYRIGHT
@@ -26,25 +27,44 @@
 
 ### configuration
 
-svnroot='https://scummvm.svn.sourceforge.net/svnroot/scummvm'
+scummvmrepo='https://github.com/scummvm/scummvm.git'
+toolsrepo='https://github.com/scummvm/scummvm-tools.git'
 
 ### init
 
 if [ $# -lt 2 ]; then
-  echo "Usage: $0 <module> <version-number> [<temporary-directory> [<tag>]]"
+  echo "Usage: $0 <scummvm | scummvm-tools> <version-number> [<temporary-directory> [<tag>]]"
   exit 1
 fi
 
+echo_n() {
+	printf "$@"
+}
+
 module=$1
 version=$2
 tmpdir=${3:-/tmp}
 tag=$4
 if [ -z "$tag" ]; then
-  tag=release-`echo $version | sed 's/\./-/g'`
+  tag="v$version"
 fi
 fullname="$module-$version"
 
-echo "packaging $module release $version, SVN tag $tag"
+# Check modules
+case $module in
+scummvm)
+    gitrepo=$scummvmrepo
+;;
+scummvm-tools)
+    gitrepo=$toolsrepo
+;;
+*)
+    echo "Unknown module $module. Only scummvm or scummvm-tools are supported"
+    exit 1
+esac
+
+
+echo "packaging $module release $version, GIT tag $tag"
 
 ### setup temp directory
 
@@ -54,25 +74,39 @@ umask 022
 
 if [ -d $fullname ]; then
   echo "There is a left-over directory in $tmpdir."
-  echo "Remove $fullname, then try again."
+  echo "Remove $tmpdir/$fullname, then try again."
   exit 1
 fi
 
-### check code out from SVN
-# TODO: Add support for making tarballs from trunk / branches?
+### check code out from GIT
 
-echo "Exporting module $module, tag $tag from SVN:"
-svn export "$svnroot/$module/tags/$tag" $fullname
+echo "Cloning module $module from GIT:"
+git clone $gitrepo $fullname
 if [ ! -d $fullname ]; then
-  echo "SVN export failed, directory $fullname doesn't exist!"
+  echo "GIT clone failed, directory $fullname doesn't exist!"
   exit 1
 fi
 
+cd $tmpdir/$fullname
+
+echo_n "Checking out tag $tag..."
+if git checkout $tag --quiet 2>/dev/null; then
+    echo done
+else
+    echo "checking out tag $tag failed."
+    exit 1
+fi
+
+cd $tmpdir
+
+echo "Cleaning up .git directory"
+rm -rf $fullname/.git
+
 ### roll the tarball
 
-echo "Creating tarball $fullname.tar:"
+echo "Creating tarball $fullname.tar..."
 rm -f $fullname.tar $fullname.tar.gz
-tar -cvf $fullname.tar $fullname
+tar -cf $fullname.tar $fullname
 
 echo "Compressing (using gzip) tarball $fullname.tar.gz..."
 gzip -c9 $fullname.tar > $fullname.tar.gz
@@ -89,7 +123,7 @@ if [ ! -f $fullname.tar.bz2 ]; then
 fi
 
 echo "Zipping $fullname.zip..."
-zip -r9 $fullname.zip $fullname
+zip -r9 $fullname.zip $fullname >/dev/null
 if [ ! -f $fullname.zip ]; then
   echo "Packaging failed, $fullname.zip doesn't exist!"
   exit 1
@@ -100,5 +134,6 @@ fi
 
 echo "Done:"
 ls -l $fullname.tar.gz $fullname.tar.bz2 $fullname.zip
+md5sum $fullname.tar.gz $fullname.tar.bz2 $fullname.zip
 
 exit 0


Commit: d2ef695e4a9c125eb00a99584eb8ee15e02d9d4e
    https://github.com/scummvm/scummvm/commit/d2ef695e4a9c125eb00a99584eb8ee15e02d9d4e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-15T13:22:53+01:00

Commit Message:
DEVTOOLS: Package release tarballs with xz also

Changed paths:
    devtools/dist-scummvm.sh



diff --git a/devtools/dist-scummvm.sh b/devtools/dist-scummvm.sh
index cc33032..56e6b4e 100755
--- a/devtools/dist-scummvm.sh
+++ b/devtools/dist-scummvm.sh
@@ -122,6 +122,13 @@ if [ ! -f $fullname.tar.bz2 ]; then
   exit 1
 fi
 
+echo "Compressing (using xz) tarball $fullname.tar.xz..."
+xz -c9 $fullname.tar > $fullname.tar.xz
+if [ ! -f $fullname.tar.xz ]; then
+  echo "Packaging to xz failed, $fullname.tar.xz doesn't exist!"
+  # But do not exit
+fi
+
 echo "Zipping $fullname.zip..."
 zip -r9 $fullname.zip $fullname >/dev/null
 if [ ! -f $fullname.zip ]; then
@@ -133,7 +140,7 @@ fi
 ### finish up
 
 echo "Done:"
-ls -l $fullname.tar.gz $fullname.tar.bz2 $fullname.zip
-md5sum $fullname.tar.gz $fullname.tar.bz2 $fullname.zip
+ls -l $fullname.tar.gz $fullname.tar.bz2 $fullname.tar.xz $fullname.zip
+md5sum $fullname.tar.gz $fullname.tar.bz2 $fullname.tar.xz $fullname.zip
 
 exit 0






More information about the Scummvm-git-logs mailing list