mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-21 06:45:24 -06:00
refactor(setup): refactor setup scripts
This commit is contained in:
parent
4833f201ad
commit
4f46184441
7 changed files with 106 additions and 52 deletions
|
|
@ -28,8 +28,8 @@ if not __release__:
|
|||
|
||||
try:
|
||||
prefix, sep, suffix = (
|
||||
subprocess.check_output(
|
||||
['git', 'describe', '--abbrev=7'], # noqa: S603,S607
|
||||
subprocess.check_output( # noqa: S603
|
||||
['git', 'describe', '--abbrev=7'], # noqa: S607
|
||||
cwd=os.path.dirname(os.path.abspath(__file__)),
|
||||
stderr=subprocess.DEVNULL,
|
||||
text=True,
|
||||
|
|
@ -43,7 +43,7 @@ if not __release__:
|
|||
if sep:
|
||||
version_prefix, dot, version_tail = prefix.rpartition('.')
|
||||
prefix = f'{version_prefix}{dot}{int(version_tail) + 1}'
|
||||
__version__ = sep.join((prefix, suffix))
|
||||
__version__ = f'{prefix}{sep}{suffix}'
|
||||
del version_prefix, dot, version_tail
|
||||
else:
|
||||
__version__ = prefix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue