Mercurial > gub
changeset 2970:8a082730d3c7
more updates of VERSION file handling
author | hanwen <hanwen@lilypond.org> |
---|---|
date | Tue, 12 Dec 2006 19:15:04 +0100 |
parents | f5e21a113c4b |
children | a80acba35025 |
files | GNUmakefile lilypondorg.py test-lily/rsync-lily-doc.py |
diffstat | 3 files changed, 17 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/GNUmakefile Tue Dec 12 17:56:54 2006 +0100 +++ b/GNUmakefile Tue Dec 12 19:15:04 2006 +0100 @@ -367,7 +367,9 @@ -cjf $(CWD)/uploads/lilypond-$(DIST_VERSION)-$(DOC_BUILDNUMBER).info-man.tar.bz2 . unlocked-doc-export: - $(PYTHON) test-lily/rsync-lily-doc.py --recreate --output-distance \ + $(PYTHON) test-lily/rsync-lily-doc.py --recreate \ + --version-file $(NATIVE_LILY_BUILD)/out/VERSION \ + --output-distance \ $(NATIVE_LILY_SRC)/buildscripts/output-distance.py $(NATIVE_LILY_BUILD)/out-www/web-root doc-export:
--- a/lilypondorg.py Tue Dec 12 17:56:54 2006 +0100 +++ b/lilypondorg.py Tue Dec 12 19:15:04 2006 +0100 @@ -90,6 +90,7 @@ test_cmd = r'''python %(cwd)s/test-lily/rsync-lily-doc.py \ --upload %(host_doc_spec)s \ + --version-file %(lilybuild)s/out/VERSION \ %(lilybuild)s/out-www/web-root/''' % d cmds.append (test_cmd)
--- a/test-lily/rsync-lily-doc.py Tue Dec 12 17:56:54 2006 +0100 +++ b/test-lily/rsync-lily-doc.py Tue Dec 12 19:15:04 2006 +0100 @@ -16,10 +16,16 @@ dest='destination', help='where to upload the result', default='') + p.add_option ('--output-distance', dest="output_distance_script", help="compute signature distances using script") + p.add_option ("--version-file", + action="store", + dest="version_file", + help="where to get the version number") + p.add_option ('--recreate', dest="recreate", action="store_true", @@ -65,7 +71,7 @@ raise 'fail' def read_version (source): - s = open (source + '/VERSION').read () + s = open (source).read () s = s.strip() return tuple (s.split ('.')) @@ -77,8 +83,7 @@ print 'creating web root in', options.unpack_dir os.chdir (options.unpack_dir) - version = read_version (source) - dir = 'v%s' % '.'.join (version) + dir = 'v%s' % '.'.join (options.version) system ('rm -rf %s' % dir) system ('mkdir -p %s' % dir) @@ -103,7 +108,7 @@ os.chdir (options.unpack_dir) - cur_version = tuple (map (int, read_version (source))) + cur_version = tuple (map (int, options.version)) region = 3 versions = [(cur_version[0], cur_version[1], cur_version[2] - i) for i in range (1, region + 1)] @@ -160,20 +165,21 @@ def upload (options, source): os.chdir (options.unpack_dir) - version = read_version (source) - dir = 'v%s' % '.'.join (version) + dir = 'v%s' % '.'.join (options.version) os.chdir (dir) system ('chmod -R g+w . ' ) system ('chgrp -R lilypond . ' ) system ('chmod 2755 `find -type d ` . ') - branch_dir = 'v%s.%s' % (version[:2]) + branch_dir = 'v%s.%s' % (options.version[:2]) system ('rsync --exclude "*.signature" --hard-links --delay-updates --delete --delete-after --stats --progress -pgorltvu -e ssh . %s/%s/' % (options.destination, branch_dir)) def main (): (opts, args) = parse_options () + opts.version = read_version (opts.version_file) + for a in args: a = os.path.abspath (a)