File tree Expand file tree Collapse file tree 2 files changed +21
-12
lines changed Expand file tree Collapse file tree 2 files changed +21
-12
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
+
3
+ import os
2
4
import subprocess
5
+
3
6
import common
4
- subprocess .check_call (['./build-all' ])
5
- subprocess .check_call (['./zip-img' ])
7
+ zip_img = imp .load_source ('zip_img' , os .path .join (common .root_dir , 'zip-img' ))
8
+
9
+ subprocess .check_call ([os .path .join (common .root_dir , 'build-all' )])
10
+ zip_img .main ()
6
11
tag = 'sha-{}' .format (common .sha )
7
- subprocess .check_call (['git' , 'tag' tag ])
12
+ subprocess .check_call (['git' , 'tag' , tag ])
8
13
subprocess .check_call (['git' , 'push' '--tags' ])
9
14
# TODO
10
15
# - https://stackoverflow.com/questions/41022470/curl-request-to-add-file-to-github-release
Original file line number Diff line number Diff line change @@ -6,12 +6,16 @@ import zipfile
6
6
7
7
import common
8
8
9
- outfile = os .path .join (common .out_dir , 'lkmc-{}.zip' .format (common .sha ))
10
- if os .path .exists (outfile ):
11
- os .unlink (outfile )
12
- zipf = zipfile .ZipFile (outfile , 'w' , zipfile .ZIP_DEFLATED )
13
- for arch in common .arches :
14
- common .setup (common .get_argparse (default_args = {'arch' : arch }))
15
- zipf .write (common .qcow2_file , arcname = os .path .relpath (common .qcow2_file , common .root_dir ))
16
- zipf .write (common .linux_image , arcname = os .path .relpath (common .linux_image , common .root_dir ))
17
- zipf .close ()
9
+ def main ():
10
+ outfile = os .path .join (common .out_dir , 'lkmc-{}.zip' .format (common .sha ))
11
+ if os .path .exists (outfile ):
12
+ os .unlink (outfile )
13
+ zipf = zipfile .ZipFile (outfile , 'w' , zipfile .ZIP_DEFLATED )
14
+ for arch in common .arches :
15
+ common .setup (common .get_argparse (default_args = {'arch' : arch }))
16
+ zipf .write (common .qcow2_file , arcname = os .path .relpath (common .qcow2_file , common .root_dir ))
17
+ zipf .write (common .linux_image , arcname = os .path .relpath (common .linux_image , common .root_dir ))
18
+ zipf .close ()
19
+
20
+ if __name__ == '__main__' :
21
+ main ()
You can’t perform that action at this time.
0 commit comments