mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Update Info.plist when bumping version.
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user