Update Info.plist when bumping version.

This commit is contained in:
Cheng Zhao 2013-11-07 15:37:21 +08:00
parent 7212fa1056
commit 48a0ac9a96

View file

@ -23,6 +23,7 @@ def main():
update_package_json(version)
update_win_rc(version, versions)
update_version_h(versions)
update_info_plist(version)
def parse_version(version):
@ -89,5 +90,20 @@ def update_version_h(versions):
return
def update_info_plist(version):
info_plist = os.path.join('browser', 'mac', 'Info.plist')
with open(info_plist, 'r') as f:
lines = f.readlines()
for i in range(0, len(lines)):
line = lines[i]
if 'CFBundleVersion' in line:
lines[i + 1] = ' <string>{0}</string>\n'.format(version)
with open(info_plist, 'w') as f:
f.write(''.join(lines))
return
if __name__ == '__main__':
sys.exit(main())