9 print('Specify the version number as parameter')
13 with open('update/LATEST_VERSION', 'w') as f:
16 versions_info = json.load(open('update/versions.json'))
17 if 'signature' in versions_info:
18 del versions_info['signature']
24 'exe': 'youtube-dl.exe',
25 'tar': 'youtube-dl-%s.tar.gz' % version}
26 build_dir = os.path.join('..', '..', 'build', version)
27 for key, filename in filenames.items():
28 fn = os.path.join(build_dir, filename)
29 with open(fn, 'rb') as f:
32 raise ValueError('File %s is empty!' % fn)
33 sha256sum = hashlib.sha256(data).hexdigest()
34 new_version[key] = (url, sha256sum)
36 versions_info['versions'][version] = new_version
37 versions_info['latest'] = version
39 with open('update/versions.json', 'w') as jsonf:
40 json.dump(versions_info, jsonf, indent=4, sort_keys=True)