mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-09 19:13:14 -06:00
build: stop using finicky version setter
This commit is contained in:
parent
900dcefff7
commit
08cf8ee7d1
3 changed files with 2 additions and 24 deletions
|
@ -1,10 +1,5 @@
|
|||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
default_install_hook_types:
|
||||
- pre-commit
|
||||
- post-commit
|
||||
default_stages:
|
||||
- commit
|
||||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 23.3.0
|
||||
|
@ -16,11 +11,4 @@ repos:
|
|||
hooks:
|
||||
- id: ruff
|
||||
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: set-version
|
||||
language: script
|
||||
name: sets __version__ in viv.py
|
||||
entry: ./scripts/bump-dev.sh
|
||||
stages: [post-commit]
|
||||
always_run: true
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
TAG=$(git describe --tags --always --dirty=-dev)
|
||||
VERSION="${TAG#v}"
|
||||
if [ "$NO_VERIFY" ]; then
|
||||
echo 'post-commit hook skipped' 1>&2
|
||||
exit 0
|
||||
fi
|
||||
if [[ "$(git diff --name-only HEAD HEAD~1)" == *"src/viv/viv.py"* ]]; then
|
||||
sed -i "s/__version__ = \".*\"/__version__ = \"$VERSION\"/g" src/viv/viv.py
|
||||
fi
|
|
@ -52,7 +52,7 @@ from typing import (
|
|||
from urllib.error import HTTPError
|
||||
from urllib.request import urlopen
|
||||
|
||||
__version__ = "23.5a1-13-gc1bf007"
|
||||
__version__ = "23.5a1-dev"
|
||||
STABLE = "23.5a1"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue