File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 2525 validate_module_site ,
2626)
2727
28+ try :
29+ # Get the RE version for display. If it's not set it means we're working locally.
30+ from render_engine .__version__ import version as re_version
31+ except ImportError :
32+ re_version = "development"
33+
34+ try :
35+ # Get the CLI version for display. If it's not set it means we're working locally.
36+ from render_engine_cli .__version__ import version as cli_version
37+ except ImportError :
38+ cli_version = "development"
39+
40+
41+ def get_version_string () -> str :
42+ return f"""
43+ Render Engine CLI version { cli_version }
44+ Render Engine version { re_version } """ .strip ()
45+
2846
2947@click .group ()
48+ @click .version_option (message = get_version_string ())
3049def app (): ...
3150
3251
@@ -297,7 +316,7 @@ def new_entry(
297316 )
298317 ):
299318 raise click .exceptions .BadParameter (f"Unknown collection: { collection } " )
300- # pdb.set_trace()
319+
301320 filepath = Path (_collection .content_path ).joinpath (filename )
302321 if filepath .exists ():
303322 if not click .confirm (
You can’t perform that action at this time.
0 commit comments