]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/convert-ly.py
Remove StepMake as a separate package
[lilypond.git] / scripts / convert-ly.py
index 383f2fb855a5437c8edd0b601e37a2e5b84e927b..2772acc7382c144590cb73ca2da6c3db58603059 100644 (file)
@@ -5,7 +5,7 @@
 
 # This file is part of LilyPond, the GNU music typesetter.
 #
-# Copyright (C) 1998--2011  Han-Wen Nienhuys <hanwen@xs4all.nl>
+# Copyright (C) 1998--2012  Han-Wen Nienhuys <hanwen@xs4all.nl>
 #                 Jan Nieuwenhuizen <janneke@gnu.org>
 #
 # LilyPond is free software: you can redistribute it and/or modify
@@ -39,6 +39,8 @@ import convertrules
 lilypond_version_re_str = '\\\\version *\"([0-9.]+)"'
 lilypond_version_re = re.compile (lilypond_version_re_str)
 
+lilypond_version_strict_re_str = '\\\\version *\"([0-9]+[.][0-9]+[.][0-9]+)"'
+lilypond_version_strict_re = re.compile (lilypond_version_strict_re_str)
 
 help_summary = (
 _ ('''Update LilyPond input to newer version.  By default, update from the
@@ -70,7 +72,7 @@ def warranty ():
 
 %s
 %s
-''' % ( _ ('Copyright (c) %s by') % '2001--2011',
+''' % ( _ ('Copyright (c) %s by') % '2001--2012',
         ' '.join (authors),
         _ ('Distributed under terms of the GNU General Public License.'),
         _ ('It comes with NO WARRANTY.')))
@@ -206,9 +208,12 @@ string."""
 
 
 def guess_lilypond_version (input):
-    m = lilypond_version_re.search (input)
+    m = lilypond_version_strict_re.search (input)
     if m:
         return m.group (1)
+    m = lilypond_version_re.search (input)
+    if m:
+        raise InvalidVersion (m.group (1))
     else:
         return ''