File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -10959,6 +10959,7 @@ Create a release:
10959
10959
....
10960
10960
git clone https://github.com/cirosantilli/linux-kernel-module-cheat linux-kernel-module-cheat-release
10961
10961
cd linux-kernel-module-cheat-release
10962
+ # export LKMC_GITHUB_TOKEN=<your-token>
10962
10963
./release
10963
10964
....
10964
10965
@@ -11000,13 +11001,14 @@ which you can then upload somewhere.
11000
11001
For example, you can create or update a GitHub release and upload automatically with:
11001
11002
11002
11003
....
11003
- git push
11004
- printf "$GITHUB_TOKEN" > "$(./getvar github_token_file)"
11004
+ # export LKMC_GITHUB_TOKEN=<your-token>
11005
11005
./release-upload
11006
11006
....
11007
11007
11008
11008
Source: link:release-upload[]
11009
11009
11010
+ Create `LKMC_GITHUB_TOKEN` under: https://github.com/settings/tokens/new and save it to your `.bashrc`.
11011
+
11010
11012
TODO: generalize that so that people can upload to their forks.
11011
11013
11012
11014
=== Fairy tale
Original file line number Diff line number Diff line change 37
37
qemu_src_dir = os .path .join (submodules_dir , 'qemu' )
38
38
parsec_benchmark_src_dir = os .path .join (submodules_dir , 'parsec-benchmark' )
39
39
ccache_dir = os .path .join ('/usr' , 'lib' , 'ccache' )
40
- github_token_file = os .path .join (data_dir , 'github-token' )
41
40
arch_map = {
42
41
'a' : 'arm' ,
43
42
'A' : 'aarch64' ,
@@ -236,9 +235,7 @@ def github_make_request(
236
235
headers = {'Accept' : 'application/vnd.github.v3+json' }
237
236
headers .update (extra_headers )
238
237
if authenticate :
239
- with open (this .github_token_file , 'r' ) as f :
240
- token = f .read ().rstrip ()
241
- headers ['Authorization' ] = 'token ' + token
238
+ headers ['Authorization' ] = 'token ' + os .environ ['LKMC_GITHUB_TOKEN' ]
242
239
if url_params is not None :
243
240
path += '?' + urllib .parse .urlencode (url_params )
244
241
request = urllib .request .Request (
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ start_time = time.time()
26
26
subprocess .check_call ([os .path .join (common .root_dir , 'configure' ), '--all' ])
27
27
subprocess .check_call ([os .path .join (common .root_dir , 'build-all' )])
28
28
release_zip .main ()
29
- subprocess .check_call (['git' , 'tag' , common .sha ])
30
29
subprocess .check_call (['git' , 'push' ])
31
30
release_upload .main ()
32
31
end_time = time .time ()
You can’t perform that action at this time.
0 commit comments