File tree 3 files changed +17
-1
lines changed
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 12
12
app = typer .Typer (context_settings = {"help_option_names" : ["-h" , "--help" ]})
13
13
14
14
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
+
15
21
@app .callback (no_args_is_help = True )
16
22
def main (
17
23
ctx : typer .Context ,
@@ -134,6 +140,13 @@ def main(
134
140
settings .highlight_commit_messages ,
135
141
help = "Make the displayed commit messages more prominent" ,
136
142
),
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
+ ),
137
150
):
138
151
import git
139
152
from manim import WHITE , config
Original file line number Diff line number Diff line change 1
1
import setuptools
2
2
3
+ from git_sim import __version__
4
+
3
5
with open ("README.md" , "r" ) as fh :
4
6
long_description = fh .read ()
5
7
6
8
setuptools .setup (
7
9
name = "git-sim" ,
8
- version = "0.2.9" ,
10
+ version = __version__ ,
9
11
author = "Jacob Stopak" ,
10
12
author_email = "jacob@initialcommit.io" ,
11
13
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