Skip to content

Commit f40e584

Browse files
committed
release: make runnable again
Create download-latest-release helper
1 parent 0bf7c7c commit f40e584

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ Checkout to the prebuilt repo version so that the scripts and documentation will
562562

563563
....
564564
git checkout <release-sha>
565-
git submodule update --init "$(./getvar qemu_src_dir)"
565+
git submodule update --init --recursive "$(./getvar qemu_src_dir)"
566566
./build-qemu
567567
./run
568568
....

download-latest-release

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env python3
2+
3+
import json
4+
import urllib.request
5+
6+
_json = json.loads(urllib.request.urlopen(urllib.request.Request(
7+
'https://api.github.com/repos/cirosantilli/linux-kernel-module-cheat/releases',
8+
headers={'Accept' : 'application/vnd.github.full+json"text/html'}
9+
)).read())
10+
asset = _json[0]['assets'][0]
11+
urllib.request.urlretrieve(asset['browser_download_url'], asset['name'])

release

100644100755
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22

3+
import imp
34
import os
45
import subprocess
56

@@ -15,8 +16,8 @@ subprocess.check_call([os.path.join(common.root_dir, 'test')])
1516
subprocess.check_call([os.path.join(common.root_dir, 'build-all')])
1617
zip_img.main()
1718
tag = 'sha-{}'.format(common.sha)
18-
subprocess.check_call(['git', 'tag', tag])
19-
subprocess.check_call(['git', 'push' '--tags'])
19+
subprocess.check_call(['git', 'tag', '-f', tag])
20+
subprocess.check_call(['git', 'push', '--tags'])
2021
# TODO
2122
# - https://stackoverflow.com/questions/41022470/curl-request-to-add-file-to-github-release
2223
# - https://stackoverflow.com/questions/38627115/upload-files-to-github-directory-using-github-api

0 commit comments

Comments
 (0)