release: make runnable again

Create download-latest-release helper
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-09-16 07:51:22 +01:00
parent 0bf7c7cb81
commit f40e584b95
3 changed files with 15 additions and 3 deletions

5
release Normal file → Executable file
View File

@@ -1,5 +1,6 @@
#!/usr/bin/env python3
import imp
import os
import subprocess
@@ -15,8 +16,8 @@ subprocess.check_call([os.path.join(common.root_dir, 'test')])
subprocess.check_call([os.path.join(common.root_dir, 'build-all')])
zip_img.main()
tag = 'sha-{}'.format(common.sha)
subprocess.check_call(['git', 'tag', tag])
subprocess.check_call(['git', 'push' '--tags'])
subprocess.check_call(['git', 'tag', '-f', tag])
subprocess.check_call(['git', 'push', '--tags'])
# TODO
# - https://stackoverflow.com/questions/41022470/curl-request-to-add-file-to-github-release
# - https://stackoverflow.com/questions/38627115/upload-files-to-github-directory-using-github-api