From 60302e18d3b99dab8e34a0590f574933e760da2b Mon Sep 17 00:00:00 2001 From: sHa Date: Mon, 13 Apr 2026 01:26:24 +0300 Subject: [PATCH] feat: Add justfile for version bumping and release process automation --- justfile | 34 ++++++++++++++++++++++++++++++++++ pyproject.toml | 2 -- uv.lock | 2 +- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 0000000..c015ebb --- /dev/null +++ b/justfile @@ -0,0 +1,34 @@ +# Bump patch version in pyproject.toml and INSTALL.md +bump: + #!/usr/bin/env python3 + import re + with open('pyproject.toml', 'r') as f: + content = f.read() + m = re.search(r'version = "(\d+)\.(\d+)\.(\d+)"', content) + if m: + old = m.group(1) + '.' + m.group(2) + '.' + m.group(3) + major, minor, patch = map(int, m.groups()) + new = f'{major}.{minor}.{patch + 1}' + with open('pyproject.toml', 'w') as f: + f.write(content.replace(m.group(0), f'version = "{new}"')) + with open('INSTALL.md', 'r') as f: + install = f.read() + with open('INSTALL.md', 'w') as f: + f.write(install.replace(old, new)) + print(f'Version bumped to {new}') + else: + print('Version not found') + +# Bump version, sync dependencies, and build package +release: bump + uv sync + uv build + @echo "Release process completed successfully!" + +# Run tests +test: + uv run pytest + +# Run the application +run *ARGS: + uv run moma {{ARGS}} diff --git a/pyproject.toml b/pyproject.toml index 9cd5d92..c99a5b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,8 +23,6 @@ dev = [ [project.scripts] moma = "main:main" -bump-version = "bump:main" -release = "release:main" [tool.uv] package = true diff --git a/uv.lock b/uv.lock index 6c676e0..815842d 100644 --- a/uv.lock +++ b/uv.lock @@ -208,7 +208,7 @@ wheels = [ [[package]] name = "moma" -version = "0.9.0" +version = "0.9.1" source = { editable = "." } dependencies = [ { name = "langcodes" },