]> git.donarmstrong.com Git - lilypond.git/blobdiff - bin/release
release: 0.0.72pre
[lilypond.git] / bin / release
index 69fa7d4fece362b20eb730347de7abe1897164c1..0cd180d68b1be563d64138dac9ceb1668ce8fa46 100755 (executable)
@@ -1,40 +1,73 @@
 #!/bin/sh
+
+# script to automate releases
+
 grep -q  '^TOP' .version
     res=$?
 if test ! -f .version  || test $res != 0; then
     echo not in topleveldir
     exit 1
 fi    
+
 function setversion() {
 eval `sed -n 's/^\([A-Z_]*\) *= *\(.*\)$/\1=\2/p' .version`
+
 MJ=$TOPLEVEL_MAJOR_VERSION
 MI=$TOPLEVEL_MINOR_VERSION
 PA=$TOPLEVEL_PATCH_LEVEL 
 MP=$TOPLEVEL_MY_PATCH_LEVEL
 NEWVER=$MJ.$MI.$PA$MP
-if [ -z $MP ]
+if [ x$MP = x -o x$MP = xpre ]
 then
     LASTVER=$MJ.$MI.`expr $PA - 1`
+
+    if [ -f $releasedir//lilypond-$LASTVER""pre.tar.gz ] ; then
+       LASTVER="$LASTVER""pre"
+    fi
 else
-       LASTVER=$MJ.$MI.$PA
+    LASTVER=$MJ.$MI.$PA
 fi
 
 echo
 echo "Current  version ("`pwd`") is $NEWVER, Last version:  $LASTVER"
 echo
 }
+
 heredir=`pwd`
-    make dist; 
-    setversion
-    LILYVER=$NEWVER
-    cp lilypond-$LILYVER.tar.gz ../releases
-    $heredir/bin/make_patch $LASTVER $NEWVER lilypond
-    gzip -f9 patch-$NEWVER
-    mv {lilypond-,patch-}*.gz ../
-cd ..
-tar cf updeet {lily,patch-}*.gz
-
-mv patch-*gz patches/
-mv lilypond*tar.gz releases/
-
-#time make 
+releasedir=`pwd`/../releases
+patchdir=`pwd`/../patches
+MAKE=${MAKE:-"make"}
+TAR=${TAR:-"tar"}
+
+
+$MAKE dist; 
+setversion
+LILYVER=$NEWVER
+
+tarball=lilypond-$LILYVER.tar.gz
+patch=patch-$LILYVER.gz
+
+mv  $tarball $releasedir/
+
+cd ../test
+$heredir/bin/make_patch $LASTVER $NEWVER lilypond
+gzip -f9 patch-$NEWVER
+mv $patch $patchdir//
+
+RPMS=`find ~/rpms/ -name lilypond-$NEWVER'*'rpm`
+rm *.rpm {lilypond,patch}-*.gz
+
+if [ ! -z "$RPMS" ]; then
+    ln $RPMS . 
+fi
+    
+ln $releasedir//$tarball .
+ln $patchdir//$patch .    
+
+
+if [ ! -z "$RPMS" ]; then
+    RPMS="lilypond-$LILYVER-1.i386.rpm lilypond-$LILYVER-1.src.rpm"
+fi    
+$TAR cf updeet $tarball $patch $RPMS
+$TAR tfv updeet
+