]> git.donarmstrong.com Git - lilypond.git/blob - bin/release
release: 0.0.70pre
[lilypond.git] / bin / release
1 #!/bin/sh
2
3 # script to automate releases
4
5 grep -q  '^TOP' .version
6     res=$?
7 if test ! -f .version  || test $res != 0; then
8     echo not in topleveldir
9     exit 1
10 fi    
11
12 function setversion() {
13 eval `sed -n 's/^\([A-Z_]*\) *= *\(.*\)$/\1=\2/p' .version`
14 MJ=$TOPLEVEL_MAJOR_VERSION
15 MI=$TOPLEVEL_MINOR_VERSION
16 PA=$TOPLEVEL_PATCH_LEVEL 
17 MP=$TOPLEVEL_MY_PATCH_LEVEL
18 NEWVER=$MJ.$MI.$PA$MP
19 if [ -z $MP -o x$MP = xpre ]
20 then
21     LASTVER=$MJ.$MI.`expr $PA - 1`
22
23     if [ -f $releasedir//lilypond-$LASTVER""pre.tar.gz ] ; then
24         LASTVER="$LASTVER""pre"
25     fi
26 else
27     LASTVER=$MJ.$MI.$PA
28 fi
29
30 echo
31 echo "Current  version ("`pwd`") is $NEWVER, Last version:  $LASTVER"
32 echo
33 }
34
35 heredir=`pwd`
36 releasedir=`pwd`/../releases
37 patchdir=`pwd`/../patches
38 make dist; 
39 setversion
40 LILYVER=$NEWVER
41
42 tarball=lilypond-$LILYVER.tar.gz
43 patch=patch-$LILYVER.gz
44
45 mv  $tarball $releasedir/
46
47 cd ../test
48 $heredir/bin/make_patch $LASTVER $NEWVER lilypond
49 gzip -f9 patch-$NEWVER
50 mv $patch $patchdir//
51
52 RPMS=`find ~/rpms/ -name lilypond-$NEWVER'*'rpm`
53 rm *.rpm {lilypond,patch}-*.gz
54
55 if [ ! -z "$RPMS" ]; then
56     ln $RPMS . 
57 fi
58     
59 ln $releasedir//$tarball .
60 ln $patchdir//$patch .    
61
62
63 if [ ! -z "$RPMS" ]; then
64     RPMS="lilypond-$LILYVER-1.i386.rpm lilypond-$LILYVER-1.src.rpm"
65 fi    
66 tar cf updeet $tarball $patch $RPMS
67 tar tfv updeet
68