summaryrefslogtreecommitdiff
path: root/scripts/temporary_touchups.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/temporary_touchups.py')
-rw-r--r--scripts/temporary_touchups.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/temporary_touchups.py b/scripts/temporary_touchups.py
index 1891bc2..20e407f 100644
--- a/scripts/temporary_touchups.py
+++ b/scripts/temporary_touchups.py
@@ -1,6 +1,10 @@
#!/usr/bin/python
"""Temporary post-build changes for Roboto."""
+from datetime import date
+import os
+from os import path
+
from nototools import font_data
import roboto_data
@@ -12,3 +16,11 @@ def apply_temporary_fixes(font):
weight = roboto_data.extract_weight_name(font_name)
weight_number = roboto_data.WEIGHTS[weight]
font['OS/2'].usWeightClass = weight_number
+
+ # Update version number from buildnumber.txt
+ build_number_txt = path.join(
+ path.dirname(__file__), os.pardir, 'res', 'buildnumber.txt')
+ build_number = open(build_number_txt).read().strip()
+ version_record = 'Version 2.%s; %d' % (build_number, date.today().year)
+ font_data.set_name_record(font, 5, version_record)
+