Index: utils/trunk/version.dat =================================================================== --- utils/trunk/version.dat (revision 1732) +++ utils/trunk/version.dat (revision 1733) @@ -1 +1 @@ -0.0.34 +0.0.35 Index: utils/trunk/README =================================================================== --- utils/trunk/README (revision 1732) +++ utils/trunk/README (revision 1733) @@ -1,17 +1,17 @@ -utils 0.0.34 +utils 0.0.35 ------------ useful svn management scripts update.sh - increments the version number of the package uses either the configure.ac version number or a version.dat file if configure.ac not available tag.sh - tags the version automatically finding the svn archive prepare.sh - prepares and uploads the tarball - hepforge specific freshtag.sh - updates, tags, and then prepares and uploads the tarball all from one command Index: utils/trunk/prepare.sh =================================================================== --- utils/trunk/prepare.sh (revision 1732) +++ utils/trunk/prepare.sh (revision 1733) @@ -1,158 +1,168 @@ #!/bin/csh set IN = $PWD set force = 0 set mypackage = applgrid if ( $#argv > 0 ) then if ( "$1" == "--help" ) then echo "Usage: prepare.sh [--help | --force | --package ]" exit endif if ( "$1" == "--force" ) then set force = 1 shift endif if ( "x$1" == "x--package" ) then shift if ( $#argv > 0 ) then set mypackage = $1 shift else echo "not enough argments after --package" exit endif endif endif if ( $#argv < 1 ) then # set DIR = `sed -n "s_/trunk__p" .svn/entries` set DIR = `svn info | grep URL | awk '{print $2}' | sed "s_/trunk.*__"` + + set mypackage = `svn info | grep URL | awk '{print $2}' | sed 's|.*source/\([^/]*\).*|\1|' | sed 's|svn$||' ` + + echo "mypackage $mypackage" + if ( $status != 0 ) then echo "not a working svn repository" exit 1 endif set PACKAGE = ${DIR:t} + set RAWPACKAGE = `echo $PACKAGE | sed 's|svn$||'` + if ( -e version.dat ) then set VERSION = `cat version.dat` else if ( -e configure.ac ) then set VERSION = `sed -n 's/AC_INIT.*,\(.*\),.*@.*/\1/p' configure.ac` else echo "directory not versioned" exit 1 endif - set dir = $PACKAGE-$VERSION + set dir = $RAWPACKAGE-$VERSION set SVNVERSION = `version -s $VERSION` - set svndir = $DIR/tags/$PACKAGE-$SVNVERSION + set svndir = $DIR/tags/$RAWPACKAGE-$SVNVERSION echo "version: $SVNVERSION" else set PACKAGE = $1 set VERSION = "" + set RAWPACKAGE = `echo $PACKAGE | sed 's|svn$||'` + if ( $#argv > 1 ) then set VERSION = `version -t $2` set SVNVERSION = `version -s $2` else cd /tmp set BASE = $PWD echo "checking out $PACKAGE" - svn export $SVNROOT/$PACKAGE/trunk $PACKAGE >& /dev/null + svn export $SVNROOT/$PACKAGE/trunk $RAWPACKAGE >& /dev/null if ( $status != 0 ) then echo "could not export $PACKAGE/trunk" cd $IN exit 1 endif if ( -e $PACKAGE/version.dat ) then set VERSION = `cat $PACKAGE/version.dat` else if ( -e $PACKAGE/configure.ac ) then set VERSION = `sed -n 's/AC_INIT.*,\(.*\),.*@.*/\1/p' $PACKAGE/configure.ac` else echo "directory not versioned" cd $IN exit 1 endif set SVNVERSION = `version -s $VERSION` mv $PACKAGE{,-$VERSION} cd $BASE endif set dir = $PACKAGE-$VERSION set svndir = $SVNROOT/$PACKAGE/tags/$PACKAGE-$SVNVERSION endif echo svndir $svndir echo "preparing tar archive for $PACKAGE version $VERSION" set DATE = `date "+%Y-%m-%d:%H:%M:%S"` set found = .found-$DATE ssh login.hepforge.org ls $mypackage/downloads/$dir.tgz >& $found set FOUND = `cat $found` rm $found if ( "$force" == 0 && "$FOUND" == "$mypackage/downloads/$dir.tgz" ) then echo "archive already exists" cd $IN exit 1 endif cd /tmp set BASE = $PWD if ( -e $dir ) then mv $dir $dir-$DATE endif svn export $svndir $dir if ( $status != 0 ) then echo "svn tag does not exist" cd $IN exit 1 endif if !( -e $dir/version.dat ) then cd $dir ./configure make dist mv $dir.tar.gz $dir.tgz else # rm $dir/version.dat tar -czf $dir.tgz $dir endif +echo "scp -P 222 $dir.tgz login.hepforge.org:$mypackage/downloads" scp -P 222 $dir.tgz login.hepforge.org:$mypackage/downloads cd $IN