diff --git a/pyproject.toml b/pyproject.toml index 1b2599d..6f52d7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ license = { text = "MIT" } name = "pyflowx" readme = "README.md" requires-python = ">=3.8" -version = "0.2.4" +version = "0.2.5" [project.scripts] autofmt = "pyflowx.cli.autofmt:main" diff --git a/src/pyflowx/__init__.py b/src/pyflowx/__init__.py index e0d0dad..f471b55 100644 --- a/src/pyflowx/__init__.py +++ b/src/pyflowx/__init__.py @@ -84,7 +84,7 @@ from .runner import CliExitCode, CliRunner from .storage import JSONBackend, MemoryBackend, StateBackend from .task import TaskCmd, TaskEvent, TaskResult, TaskSpec, TaskStatus -__version__ = "0.2.4" +__version__ = "0.2.5" __all__ = [ "IS_LINUX", diff --git a/src/pyflowx/cli/bumpversion.py b/src/pyflowx/cli/bumpversion.py index e7521eb..0f9f1f3 100644 --- a/src/pyflowx/cli/bumpversion.py +++ b/src/pyflowx/cli/bumpversion.py @@ -236,26 +236,28 @@ def main() -> None: print(f"版本号已更新为: {new_version}") - # 提交修改 - graph = px.Graph.from_specs([ + # 提交修改并创建标签 + tasks = [ px.TaskSpec("git_add", cmd=["git", "add", "."]), px.TaskSpec( "git_commit", cmd=["git", "commit", "-m", f"bump version to {new_version}"], depends_on=("git_add",), ), - ]) - px.run(graph, strategy="sequential") + ] - # 创建 git tag if not args.no_tag: tag_name = f"v{new_version}" - graph = px.Graph.from_specs([ + tasks.append( px.TaskSpec( "git_tag", cmd=["git", "tag", "-a", tag_name, "-m", f"Release {tag_name}"], depends_on=("git_commit",), - ), - ]) - px.run(graph, strategy="sequential") - print(f"已创建标签: {tag_name}") + ) + ) + + graph = px.Graph.from_specs(tasks) + px.run(graph, strategy="sequential") + + if not args.no_tag: + print(f"已创建标签: v{new_version}")