File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1+ __version__ = "0.2.9"
Original file line number Diff line number Diff line change 1212app = typer .Typer (context_settings = {"help_option_names" : ["-h" , "--help" ]})
1313
1414
15+ def version_callback (value : bool ) -> None :
16+ if value :
17+ print (f"git-sim version { git_sim .__version__ } " )
18+ raise typer .Exit ()
19+
20+
1521@app .callback (no_args_is_help = True )
1622def main (
1723 ctx : typer .Context ,
@@ -134,6 +140,13 @@ def main(
134140 settings .highlight_commit_messages ,
135141 help = "Make the displayed commit messages more prominent" ,
136142 ),
143+ version : bool = typer .Option (
144+ False ,
145+ "--version" ,
146+ "-v" ,
147+ help = "Show the version of git-sim and exit." ,
148+ callback = version_callback ,
149+ ),
137150):
138151 import git
139152 from manim import WHITE , config
Original file line number Diff line number Diff line change 11import setuptools
22
3+ from git_sim import __version__
4+
35with open ("README.md" , "r" ) as fh :
46 long_description = fh .read ()
57
68setuptools .setup (
79 name = "git-sim" ,
8- version = "0.2.9" ,
10+ version = __version__ ,
911 author = "Jacob Stopak" ,
1012 author_email = "jacob@initialcommit.io" ,
1113 description = "Simulate Git commands on your own repos by generating an image (default) or video visualization depicting the command's behavior." ,
You can’t perform that action at this time.
0 commit comments