mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
release: make runnable again
Create download-latest-release helper
This commit is contained in:
@@ -562,7 +562,7 @@ Checkout to the prebuilt repo version so that the scripts and documentation will
|
||||
|
||||
....
|
||||
git checkout <release-sha>
|
||||
git submodule update --init "$(./getvar qemu_src_dir)"
|
||||
git submodule update --init --recursive "$(./getvar qemu_src_dir)"
|
||||
./build-qemu
|
||||
./run
|
||||
....
|
||||
|
||||
11
download-latest-release
Executable file
11
download-latest-release
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
import urllib.request
|
||||
|
||||
_json = json.loads(urllib.request.urlopen(urllib.request.Request(
|
||||
'https://api.github.com/repos/cirosantilli/linux-kernel-module-cheat/releases',
|
||||
headers={'Accept' : 'application/vnd.github.full+json"text/html'}
|
||||
)).read())
|
||||
asset = _json[0]['assets'][0]
|
||||
urllib.request.urlretrieve(asset['browser_download_url'], asset['name'])
|
||||
5
release
Normal file → Executable file
5
release
Normal file → Executable 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
|
||||
|
||||
Reference in New Issue
Block a user