f4pga: add pyproject.toml
Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
This commit is contained in:
parent
30eb91feed
commit
e709908bcb
|
@ -0,0 +1,2 @@
|
|||
[tool.black]
|
||||
line-length = 120
|
|
@ -55,13 +55,13 @@ version = None
|
|||
with (packagePath.parent / '.gitcommit').open("r") as rptr:
|
||||
sha = rptr.read().strip()
|
||||
if sha != '$Format:%h$':
|
||||
version = f'{semver}-{sha}'
|
||||
version = f'{semver}+{sha}'
|
||||
|
||||
git = which('git')
|
||||
if git is not None:
|
||||
proc = run(['git', 'rev-parse', 'HEAD'], capture_output=True)
|
||||
if proc.returncode == 0:
|
||||
version = f'{semver}-{proc.stdout.decode("utf8")[0:8]}'
|
||||
version = f'{semver}+{proc.stdout.decode("utf8")[0:8]}'
|
||||
|
||||
if version is None:
|
||||
version = semver
|
||||
|
|
Loading…
Reference in New Issue