diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/LexGen.py | 2 | ||||
-rw-r--r-- | scripts/ScintillaData.py | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/scripts/LexGen.py b/scripts/LexGen.py index ae7ae99d5..261cb7ee1 100644 --- a/scripts/LexGen.py +++ b/scripts/LexGen.py @@ -29,7 +29,7 @@ def UpdateVersionNumbers(sci, root): UpdateLineInFile(root + "doc/ScintillaDownload.html", " Release", " Release " + sci.versionDotted) ReplaceREInFile(root + "doc/ScintillaDownload.html", - r"/www.scintilla.org/([a-zA-Z]+)\d\d\d", + r"/www.scintilla.org/([a-zA-Z]+)\d\d\d\d?", r"/www.scintilla.org/\g<1>" + sci.version) UpdateLineInFile(root + "doc/index.html", ' <font color="#FFCC99" size="3"> Release version', diff --git a/scripts/ScintillaData.py b/scripts/ScintillaData.py index 0ac1eddfa..385db59af 100644 --- a/scripts/ScintillaData.py +++ b/scripts/ScintillaData.py @@ -195,10 +195,16 @@ class ScintillaData: # Discover verion information with open(scintillaRoot + "version.txt") as f: self.version = f.read().strip() - self.versionDotted = self.version[0] + '.' + self.version[1] + '.' + \ - self.version[2] - self.versionCommad = self.version[0] + ', ' + self.version[1] + ', ' + \ - self.version[2] + ', 0' + if len(self.version) == 3: + self.versionDotted = self.version[0] + '.' + self.version[1] + '.' + \ + self.version[2] + self.versionCommad = self.version[0] + ', ' + self.version[1] + ', ' + \ + self.version[2] + ', 0' + else: + self.versionDotted = self.version[0] + '.' + self.version[1:3] + '.' + \ + self.version[3] + self.versionCommad = self.version[0] + ', ' + self.version[1:3] + ', ' + \ + self.version[3] + ', 0' with open(scintillaRoot + "doc/index.html") as f: self.dateModified = [l for l in f.readlines() if "Date.Modified" in l]\ |