Generate changelog link automatically in add_version_info
This commit is contained in:
parent
4695b156e0
commit
ff51aad139
1 changed files with 3 additions and 8 deletions
|
@ -9,12 +9,6 @@ import shutil
|
|||
import json
|
||||
import traceback
|
||||
|
||||
DETAILS_URLS = {
|
||||
'4.0': 'https://www.zotero.org/support/4.0_changelog',
|
||||
'5.0': 'https://www.zotero.org/support/5.0_changelog',
|
||||
'6.0': 'https://www.zotero.org/support/6.0_changelog',
|
||||
'7.0': 'https://www.zotero.org/support/7.0_changelog'
|
||||
}
|
||||
MAJOR = None
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
|
@ -31,6 +25,7 @@ def main():
|
|||
try:
|
||||
file = args.file
|
||||
version = args.version
|
||||
short_version = version[0:3]
|
||||
|
||||
# Back up JSON file
|
||||
shutil.copy2(file, file + '.bak')
|
||||
|
@ -38,11 +33,11 @@ def main():
|
|||
# Read in existing file
|
||||
with open(file) as f:
|
||||
updates = json.loads(f.read())
|
||||
|
||||
|
||||
updates.append({
|
||||
'version': version,
|
||||
'buildID': args.build_id,
|
||||
'detailsURL': DETAILS_URLS[version[0:3]],
|
||||
'detailsURL': f'https://www.zotero.org/support/{short_version}_changelog',
|
||||
'major': MAJOR
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue