From 3435d908a4324da4bd274fdf584365c51a566d31 Mon Sep 17 00:00:00 2001 From: jedzill4 Date: Sat, 25 Jan 2025 05:03:55 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20remove=20unused=20semanti?= =?UTF-8?q?c=20hook=20and=20update=20semantic=20release=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hooks/__init__.py | 0 hooks/semantic_hook.py | 20 -------------------- pyproject.toml | 13 +++++-------- 3 files changed, 5 insertions(+), 28 deletions(-) delete mode 100644 hooks/__init__.py delete mode 100644 hooks/semantic_hook.py diff --git a/hooks/__init__.py b/hooks/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/hooks/semantic_hook.py b/hooks/semantic_hook.py deleted file mode 100644 index a490a69..0000000 --- a/hooks/semantic_hook.py +++ /dev/null @@ -1,20 +0,0 @@ -from subprocess import run - - -def post_version(version: str): - """ - Hook to update the version file, commit the changes, and force push the new tag. - This hook uses the Gitmoji specification for commit messages. - """ - # Update the version file using uv build - run(["uv", "build", "--frozen"], check=True) - - # Commit the updated version file - run(["git", "add", "aymurai/version.py"], check=True) - run(["git", "commit", "-m", f"🔖 chore: update version to {version}"], check=True) - run(["git", "push"], check=True) - - # Update and force-push the Git tag - tag_name = f"v{version}" - run(["git", "tag", "-f", tag_name], check=True) - run(["git", "push", "--force", "origin", tag_name], check=True) diff --git a/pyproject.toml b/pyproject.toml index eb5e6da..8bbad79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -160,17 +160,14 @@ version_file = "aymurai/version.py" # Semantic-release configuration ####################################################################################### [tool.semantic_release] -version_source = "tag" # Semantic-release uses Git tags to determine versions # branch = "main" # Release from the main branch -branch = "feature/gh-actions" # Release from the main branch -commit_parser = "emoji" # Use Gitmoji for commit parsing -changelog_file = "CHANGELOG.md" # Optional changelog generation +version_source = "tag" # Semantic-release uses Git tags to determine versions +version_variables = ["aymurai/version.py:__version__"] +branch = "feature/gh-actions" # Release from the main branch +commit_parser = "emoji" # Use Gitmoji for commit parsing +changelog_file = "CHANGELOG.md" # Optional changelog generation upload_to_pypi = false - -[tool.semantic_release.hooks] -post_version = "hooks.semantic_hooks:post_version" - [tool.semantic_release.branches.main] match = "(main|master)" prerelease = false