Commit 266262c 1 parent 53b0a7a commit 266262c Copy full SHA for 266262c
File tree 4 files changed +14
-3
lines changed
4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change
1
+ 0.9.1
Original file line number Diff line number Diff line change 1
1
import platform
2
2
3
3
4
- # metarget version
5
- VERSION = '0.3'
6
4
# default CNI plugin
7
5
DEFAULT_CNI_PLUGIN = 'flannel'
8
6
# default kata runtime type
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import os
9
9
import sys
10
10
11
11
import utils .system as system_func
12
+ import utils .util as util
12
13
import utils .color_print as color_print
13
14
import cmds .gadget
14
15
import cmds .cnv
@@ -47,7 +48,7 @@ def main():
47
48
'-v' ,
48
49
'--version' ,
49
50
action = 'version' ,
50
- version = 'metarget {ver}' .format (ver = config . VERSION ))
51
+ version = 'metarget {ver}' .format (ver = util . get_metarget_version () ))
51
52
52
53
parser .set_defaults (func = lambda x : parser .print_help ())
53
54
# add subparsers
Original file line number Diff line number Diff line change
1
+ """
2
+ Trivial utilities
3
+ """
4
+
5
+
6
+ def get_metarget_version ():
7
+ try :
8
+ with open ("VERSION" , "r" ) as f :
9
+ return f .read ().strip ()
10
+ except FileNotFoundError :
11
+ return "unknown"
You can’t perform that action at this time.
0 commit comments