diff options
author | Roozbeh Pournader <roozbeh@google.com> | 2015-01-07 13:31:02 -0800 |
---|---|---|
committer | James Godfrey-Kittle <jamesgk@google.com> | 2015-04-16 12:16:24 -0700 |
commit | 403041dcfae9f364038c3dcc034238d2ea1ddafc (patch) | |
tree | 30db3ff9f10bac4c1fd2e721ddabbfab93fecd1c /scripts/temporary_touchups.py | |
parent | f78193176ea782adab14ca4bda517eeb699e571b (diff) |
Move updating version numbers to temporar_touchups.
This is so that both Adroid and Web targets could reuse it.
Diffstat (limited to 'scripts/temporary_touchups.py')
-rw-r--r-- | scripts/temporary_touchups.py | 12 |
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) + |