From 08cf8ee7d1fe1afd55c1a488dfeb489a964b7d60 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sun, 28 May 2023 17:21:11 -0500 Subject: [PATCH] build: stop using finicky version setter --- .pre-commit-config.yaml | 14 +------------- scripts/bump-dev.sh | 10 ---------- src/viv/viv.py | 2 +- 3 files changed, 2 insertions(+), 24 deletions(-) delete mode 100755 scripts/bump-dev.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8509398..1f1aa0e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 + diff --git a/scripts/bump-dev.sh b/scripts/bump-dev.sh deleted file mode 100755 index 86ff4e2..0000000 --- a/scripts/bump-dev.sh +++ /dev/null @@ -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 diff --git a/src/viv/viv.py b/src/viv/viv.py index f4463f4..8cf2cfe 100755 --- a/src/viv/viv.py +++ b/src/viv/viv.py @@ -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"