lilypond-1.3.78
[lilypond.git] / bin / release.py
blob731a2ee2eae532427ad2ec9943aec9c1441f0d9a
1 #!@PYTHON@
3 import sys
4 import os
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)
13 lilypath = lilypath + '/bin/'
14 sys.path.append(lilypath)
16 from lilypython import *
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))
29 # not a module, but a script (JCN)
30 # makepatch.main()
32 # Module wherefore aren't thou Script
33 # A Rose by any other name would be as blonde. --HWN
35 os.system('python ' + lilydirs.topdir + '/bin/make-patch.py');
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;
42 os.rename(pn, rel_pn);
43 os.link(rel_pn, pn);
45 os.system('tar cf updeet *gz')