From 3b1cc485d7d251b3052eeefb8adb057d16665abf Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Sat, 19 May 2007 17:36:50 +0200 Subject: [PATCH] - Added a new script to push git versions. --- dist/gitdist.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 dist/gitdist.sh diff --git a/dist/gitdist.sh b/dist/gitdist.sh new file mode 100755 index 0000000..85ab96f --- /dev/null +++ b/dist/gitdist.sh @@ -0,0 +1,51 @@ +#!/bin/sh +# +# Make a new distribution archive. Command line specification of the tag +# +# For now, just windows. Others will follow. +# +TAG="v1.0-beta7" + +DOCDIR=doc/manual +MANUAL=scyther-manual.pdf + +DNAM="scyther-$TAG" +TMPDIR="/tmp" +RESDIR="$TMPDIR/$DNAM" +rm -rf $RESDIR + +cd .. && git-archive --format=tar --prefix=$DNAM/ $TAG | (cd $TMPDIR && tar xf -) + +ls $RESDIR + +# Windows binary +cd $RESDIR/src + +# Where is stuff going to +DESTDIR=$RESDIR/gui + +# Prepare version.h with the correct flag (tag) +echo "#define SVNVERSION \"Unknown\"" >$RESDIR/src/version.h +echo "#define TAGVERSION \"$TAG\"" >>$RESDIR/src/version.h +echo "" >>$RESDIR/src/version.h + +# Manual +cp $RESDIR/$DOCDIR/$MANUAL $DESTDIR + +# Default flags +CMFLAGS="-D CMAKE_BUILD_TYPE:STRING=Release" +# Make for windows and linux +cmake $CMFLAGS -D TARGETOS=Win32 . && make +#cmake $CMFLAGS . && make + +cp scyther-w32.exe $RESDIR/gui/Scyther/Bin + +# Prepare tag for gui version +echo "SCYTHER_GUI_VERSION = \"$TAG\"" >$DESTDIR/Gui/Version.py + +# Make archive out of the result +WORKNAME="scyther-$TAG" +cd $RESDIR +mv gui $WORKNAME +zip -r scyther-w32-$TAG.zip $WORKNAME +