mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-13 20:47:53 -06:00
build: add hook to set version in viv.py
This commit is contained in:
parent
1e74ebf413
commit
0d0c66d090
3 changed files with 13 additions and 1 deletions
|
@ -20,3 +20,10 @@ repos:
|
|||
rev: 'v0.0.245'
|
||||
hooks:
|
||||
- id: ruff
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: set-version
|
||||
language: script
|
||||
name: sets __version__ in viv.py
|
||||
entry: ./scripts/bump-dev.sh
|
||||
files: viv.py$
|
||||
|
|
5
scripts/bump-dev.sh
Executable file
5
scripts/bump-dev.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env sh
|
||||
TAG=$(git describe --tags --always --dirty=-dev)
|
||||
VERSION="${TAG#v}"
|
||||
sed -i "s/__version__ = \".*\"/__version__ = \"$VERSION\"/g" src/viv/viv.py
|
||||
git add src/viv/viv.py
|
|
@ -30,7 +30,7 @@ from pathlib import Path
|
|||
from textwrap import dedent, wrap
|
||||
from typing import Dict, List, Tuple
|
||||
|
||||
__version__ = "22.12a3"
|
||||
__version__ = "22.12a3-34-g1e74ebf-dev"
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
Loading…
Reference in a new issue