Addeda versionin package.json.
This commit is contained in:
parent
2fa7088fd1
commit
2d2ad0d33b
2 changed files with 17 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "electron",
|
"name": "electron",
|
||||||
|
"version": "0.36.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"asar": "^0.8.0",
|
"asar": "^0.8.0",
|
||||||
"coffee-script": "^1.9.2",
|
"coffee-script": "^1.9.2",
|
||||||
|
|
|
@ -31,6 +31,7 @@ def main():
|
||||||
update_win_rc(version, versions)
|
update_win_rc(version, versions)
|
||||||
update_version_h(versions)
|
update_version_h(versions)
|
||||||
update_info_plist(version)
|
update_info_plist(version)
|
||||||
|
update_package_json(version)
|
||||||
tag_version(version)
|
tag_version(version)
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,6 +114,21 @@ def update_info_plist(version):
|
||||||
f.write(''.join(lines))
|
f.write(''.join(lines))
|
||||||
|
|
||||||
|
|
||||||
|
def update_package_json(version):
|
||||||
|
package_json = 'package.json'
|
||||||
|
with open(package_json, 'r') as f:
|
||||||
|
lines = f.readlines()
|
||||||
|
|
||||||
|
for i in range(0, len(lines)):
|
||||||
|
line = lines[i];
|
||||||
|
if 'version' in line:
|
||||||
|
lines[i] = ' "version": "{0}",\n'.format(version)
|
||||||
|
break
|
||||||
|
|
||||||
|
with open(package_json, 'w') as f:
|
||||||
|
f.write(''.join(lines))
|
||||||
|
|
||||||
|
|
||||||
def tag_version(version):
|
def tag_version(version):
|
||||||
execute(['git', 'commit', '-a', '-m', 'Bump v{0}'.format(version)])
|
execute(['git', 'commit', '-a', '-m', 'Bump v{0}'.format(version)])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue