Fix update.py
This commit is contained in:
parent
482be408af
commit
245b1adc50
10
update.py
10
update.py
|
|
@ -90,15 +90,13 @@ def main():
|
||||||
temp_note_fd, temp_note_name = mkstemp()
|
temp_note_fd, temp_note_name = mkstemp()
|
||||||
with open(temp_note_fd, 'w', encoding='utf-8') as f:
|
with open(temp_note_fd, 'w', encoding='utf-8') as f:
|
||||||
f.write(tag + '\n\n```diff' + diff + '\n```')
|
f.write(tag + '\n\n```diff' + diff + '\n```')
|
||||||
temp_zip_fd, temp_zip_name = mkstemp(suffix='.zip')
|
zip_path = _file_path('dist', f'#holiday-cn-{tag}.zip')
|
||||||
f = open(temp_zip_fd, 'wb')
|
pack_data(zip_path)
|
||||||
pack_data(f)
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
|
subprocess.run(['hub', 'push'], check=True)
|
||||||
subprocess.run(['hub', 'release', 'create', '-F', temp_note_name,
|
subprocess.run(['hub', 'release', 'create', '-F', temp_note_name,
|
||||||
'-a', f'{temp_zip_name}#holiday-cn-{tag}.zip',
|
'-a', f'{zip_path}#JSON数据',
|
||||||
tag], check=True)
|
tag], check=True)
|
||||||
os.unlink(temp_note_fd)
|
|
||||||
os.unlink(temp_note_name)
|
os.unlink(temp_note_name)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user