forked from 0x2620/oxjs
write current version to Ox.json and patch Ox.VERSION if loaded via dev/Ox.js
This commit is contained in:
parent
01587f7348
commit
57caa45bf8
5 changed files with 12 additions and 9 deletions
|
|
@ -126,7 +126,10 @@ def build_oxjs(downloads=False, geo=False):
|
|||
ox_files[2].append(js_dir + filename)
|
||||
js = re.sub("Ox.VERSION = '([\d\.]+)'", "Ox.VERSION = '%s'" % version, js)
|
||||
write_file(build_path + 'Ox.js', ox.js.minify(js, comment))
|
||||
write_file(dev_path + '/Ox/json/' + 'Ox.json', json.dumps(ox_files, indent=4))
|
||||
write_file(dev_path + '/Ox/json/' + 'Ox.json', json.dumps({
|
||||
'files': ox_files,
|
||||
'version': version
|
||||
}, indent=4))
|
||||
|
||||
# Ox.UI
|
||||
js = ''
|
||||
|
|
@ -183,8 +186,7 @@ def build_oxjs(downloads=False, geo=False):
|
|||
lambda x: not re.search('^[\._]', x),
|
||||
os.listdir(root_path + 'readme/html/')
|
||||
)
|
||||
),
|
||||
'version': version
|
||||
)
|
||||
}
|
||||
write_file(root_path + 'index.json', json.dumps(data, indent=4, sort_keys=True))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue