]> git.donarmstrong.com Git - lilypond.git/blob - bin/release.py
release: 0.1.48
[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 try:
23     os.rename('out/' + tarball(cur_ver), released_tarball(cur_ver))
24 except posix.error:
25     os.system('cp out/' + tarball(cur_ver)  + ' ' + released_tarball(cur_ver))
26     os.unlink('out/' + tarball (cur_ver))
27     
28 os.chdir(lilydirs.groupdir + '/test')
29 os.system('pwd')
30 os.system('rm ../test/*gz')
31
32 #huh?
33 #os.symlink(released_tarball(cur_ver), tarball(cur_ver))
34
35 try:
36     os.link(released_tarball(cur_ver), tarball(cur_ver))
37 except posix.error:
38     os.system('cp ' + released_tarball(cur_ver) + ' '+  tarball(cur_ver))
39
40 # not a module, but a script (JCN)
41 # makepatch.main()
42
43 # Module wherefore aren't thou Script
44 # A Rose by any other name would be as blonde. --HWN
45
46 os.system('python ' + lilydirs.topdir + '/bin/make-patch.py');
47
48 pn = 'patch-%s' % version_tuple_to_str(cur_ver)
49 os.system('gzip -9 ' + pn)
50 pn = pn + '.gz'
51 rel_pn = lilydirs.release_dir + '../patches/' + pn;
52
53 os.rename(pn, rel_pn);
54 os.link(rel_pn, pn);
55
56 os.system('tar cf updeet *gz')