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:
1095910959....
1096010960git clone https://github.com/cirosantilli/linux-kernel-module-cheat linux-kernel-module-cheat-release
1096110961cd linux-kernel-module-cheat-release
10962+ # export LKMC_GITHUB_TOKEN=<your-token>
1096210963./release
1096310964....
1096410965
@@ -11000,13 +11001,14 @@ which you can then upload somewhere.
1100011001For example, you can create or update a GitHub release and upload automatically with:
1100111002
1100211003....
11003- git push
11004- printf "$GITHUB_TOKEN" > "$(./getvar github_token_file)"
11004+ # export LKMC_GITHUB_TOKEN=<your-token>
1100511005./release-upload
1100611006....
1100711007
1100811008Source: link:release-upload[]
1100911009
11010+ Create `LKMC_GITHUB_TOKEN` under: https://github.com/settings/tokens/new and save it to your `.bashrc`.
11011+
1101011012TODO: generalize that so that people can upload to their forks.
1101111013
1101211014=== Fairy tale
Original file line number Diff line number Diff line change 3737qemu_src_dir = os .path .join (submodules_dir , 'qemu' )
3838parsec_benchmark_src_dir = os .path .join (submodules_dir , 'parsec-benchmark' )
3939ccache_dir = os .path .join ('/usr' , 'lib' , 'ccache' )
40- github_token_file = os .path .join (data_dir , 'github-token' )
4140arch_map = {
4241 'a' : 'arm' ,
4342 'A' : 'aarch64' ,
@@ -236,9 +235,7 @@ def github_make_request(
236235 headers = {'Accept' : 'application/vnd.github.v3+json' }
237236 headers .update (extra_headers )
238237 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' ]
242239 if url_params is not None :
243240 path += '?' + urllib .parse .urlencode (url_params )
244241 request = urllib .request .Request (
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ start_time = time.time()
2626subprocess .check_call ([os .path .join (common .root_dir , 'configure' ), '--all' ])
2727subprocess .check_call ([os .path .join (common .root_dir , 'build-all' )])
2828release_zip .main ()
29- subprocess .check_call (['git' , 'tag' , common .sha ])
3029subprocess .check_call (['git' , 'push' ])
3130release_upload .main ()
3231end_time = time .time ()
You can’t perform that action at this time.
0 commit comments