Skip to content

Commit

Permalink
fix #19 : made the documentation link in Windows menu version-specifi…
Browse files Browse the repository at this point in the history
…c (larray-editor)
  • Loading branch information
alixdamman committed May 8, 2018
1 parent 55dec65 commit ec67942
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion releaser/make_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
from __future__ import print_function, unicode_literals

import sys
import json
from datetime import date
from os import makedirs
from os.path import exists, join
from os.path import exists, join, isfile
from subprocess import check_call

from releaser.utils import (call, do, doechocall, yes, no, zip_unpack, rmtree, branchname, short, long_release_name,
Expand Down Expand Up @@ -173,6 +174,18 @@ def update_version(config):
('git_tag: ', " git_tag: {}".format(version))]
replace_lines(meta_file, changes)

# larray-editor.json (for larray-editor project)
menuinst_file = join('condarecipe', package_name, 'larray-editor.json')
if isfile(menuinst_file):
with open(menuinst_file) as mf:
data = json.load(mf)
menu_items = data['menu_items']
for i, menu_item in enumerate(menu_items[:]):
if 'webbrowser' in menu_item:
menu_items[i]['webbrowser'] = 'http://larray.readthedocs.io/en/{}'.format(version)
with open(menuinst_file, mode='w') as mf:
json.dump(data, mf, indent=4)

# __init__.py
init_file = join(src_code, '__init__.py')
changes = [('__version__ =', "__version__ = '{}'".format(version))]
Expand Down

0 comments on commit ec67942

Please sign in to comment.