1
0
mirror of synced 2025-02-20 12:31:12 +01:00

move utility script to utils/

Add toml as dev deps for bump_version.py
Move __version__ to jubeatools.version
This commit is contained in:
Stepland 2021-05-01 12:23:38 +02:00
parent a53442fdea
commit dbac208fd2
6 changed files with 24 additions and 4 deletions

View File

@ -1,3 +0,0 @@
from .song import Song
__version__ = "0.1.1"

1
jubeatools/version.py Normal file
View File

@ -0,0 +1 @@
__version__ = "0.1.1"

2
poetry.lock generated
View File

@ -340,7 +340,7 @@ python-versions = "*"
[metadata]
lock-version = "1.1"
python-versions = "^3.8"
content-hash = "096f7add9e348d0681c9e3fc934d2332f45b13271e9cacfc2e58c2c86a5117d1"
content-hash = "95f474b138c41e0c0ed74e4ccf573c90ea1f0b9281e91a1763fad2299a6a9f49"
[metadata.files]
appdirs = [

View File

@ -25,6 +25,7 @@ black = "^19.10b0"
hypothesis = "^6.10.1"
mypy = "^0.812"
isort = "^4.3.21"
toml = "^0.10.2"
[tool.poetry.scripts]
jubeatools = 'jubeatools.cli:convert'

21
utils/bump_version.py Normal file
View File

@ -0,0 +1,21 @@
import argparse
import subprocess
import toml
parser = argparse.ArgumentParser()
parser.add_argument(
"rule",
help="either a semver string or a bump rule, will be passed to poetry",
)
args = parser.parse_args()
subprocess.run(["poetry", "version", args.rule], check=True)
with open("pyproject.toml") as f:
pyproject = toml.load(f)
version = pyproject["tool"]["poetry"]["version"]
with open("jubeatools/version.py", mode="w") as f:
f.write(f'__version__ = "{version}"\n')