]> git.donarmstrong.com Git - lilypond.git/blob - bin/release.py
fa6a9c4035e770b62ae3600d54007c9998575c03
[lilypond.git] / bin / release.py
1 #!@PYTHON@
2
3 import sys
4 import os
5
6 lilypath =''
7 try:
8     lilypath = os.environ['LILYPOND_SOURCEDIR'] + '/'
9 except KeyError:
10     print 'Please set LILYPOND_SOURCEDIR to the toplevel source, eg LILYPOND_SOURCEDIR=/home/foobar/lilypond-1.2.3/'
11     sys.exit(1)
12
13 lilypath = lilypath + '/bin/'
14 sys.path.append(lilypath)
15
16 from lilypython import *
17
18 os.chdir(lilydirs.topdir)
19 os.system('make dist')
20 cur_ver = lilydirs.version_tuple()
21 print tarball(cur_ver)
22 os.rename('out/' + tarball(cur_ver), released_tarball(cur_ver))
23 os.chdir('../test')
24 os.system('pwd')
25 os.system('rm ../test/*gz')
26 os.link(released_tarball(cur_ver), tarball(cur_ver))
27
28
29 # not a module, but a script (JCN)
30 # makepatch.main()
31
32 # Module wherefore aren't thou Script
33 # A Rose by any other name would be as blonde. --HWN
34
35 os.system('python ' + lilydirs.topdir + '/bin/make-patch.py');
36
37 pn = 'patch-%s' % version_tuple_to_str(cur_ver)
38 os.system('gzip -9 ' + pn)
39 pn = pn + '.gz'
40 rel_pn = lilydirs.release_dir + '../patches/' + pn;
41
42 os.rename(pn, rel_pn);
43 os.link(rel_pn, pn);
44
45 os.system('tar cf updeet *gz')