File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 33from InquirerPy import prompt
44from InquirerPy .base .control import Choice
55from .argument_parser import Config
6+ from robyn .robyn import get_version
67
78
89def create_robyn_app ():
@@ -81,11 +82,13 @@ def docs():
8182 webbrowser .open ("https://sparckles.github.io/robyn/#/" )
8283
8384
84-
8585if __name__ == "__main__" :
8686 config = Config ()
8787 if config .create :
8888 create_robyn_app ()
8989
90+ if config .version :
91+ print (get_version ())
92+
9093 if config .docs :
9194 docs ()
Original file line number Diff line number Diff line change @@ -51,6 +51,12 @@ def __init__(self) -> None:
5151 default = False ,
5252 help = "Open the browser on successful start." ,
5353 )
54+ parser .add_argument (
55+ "--version" ,
56+ action = "store_true" ,
57+ default = False ,
58+ help = "Show the Robyn version." ,
59+ )
5460
5561 args , _ = parser .parse_known_args ()
5662
@@ -60,6 +66,7 @@ def __init__(self) -> None:
6066 self .create = args .create
6167 self .docs = args .docs
6268 self .open_browser = args .open_browser
69+ self .version = args .version
6370
6471 if self .dev and (self .processes != 1 or self .workers != 1 ):
6572 raise Exception ("--processes and --workers shouldn't be used with --dev" )
You can’t perform that action at this time.
0 commit comments