File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33Status of the ` main ` branch. Changes prior to the next official version change will appear here.
44
5+ * General:
6+ - Support ` serena --version ` CLI command for displaying the current version #1347
7+
58# v1.1.2 (2026-04-14)
69
710* General:
Original file line number Diff line number Diff line change @@ -139,6 +139,26 @@ def __init__(self) -> None:
139139 "that separate entrypoint for performance reasons, see `serena-hooks --help`. You can run `<command> --help` for more info on each command." ,
140140 )
141141
142+ # register --version / -V flag
143+ self .params .append (
144+ click .Option (
145+ ["--version" , "-V" ],
146+ is_flag = True ,
147+ expose_value = False ,
148+ is_eager = True ,
149+ callback = self ._print_version ,
150+ help = "Show the version and exit." ,
151+ )
152+ )
153+
154+ @staticmethod
155+ def _print_version (ctx : click .Context , _param : click .Parameter , value : bool ) -> None :
156+ """Print version string and exit if the flag is set."""
157+ if not value :
158+ return
159+ click .echo (f"Serena { serena_version ()} " )
160+ ctx .exit ()
161+
142162 @staticmethod
143163 @click .command (
144164 "init" ,
You can’t perform that action at this time.
0 commit comments