From df023c67ea9a3158279ea38f8e3d51f1c377e041 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 19 Mar 2026 03:58:28 +0000 Subject: [PATCH] add bump task --- Taskfile.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Taskfile.yml b/Taskfile.yml index 7fc2348..abe68f6 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -24,3 +24,18 @@ tasks: platforms: [windows] cmds: - '{{.SHELL}} -Command "pdm run scons"' + + bump: + desc: Bump the version number + preconditions: + - sh: '{{.SHELL}} -c "if (Get-Command bump) { exit 0 } else { exit 1 }"' + msg: "The 'bump' command is not available. Run `go install github.com/onyx-and-iris/bump/cmd/bump@latest`." + cmds: + - | + {{if eq .CLI_ARGS "show"}} + {{.SHELL}} -c "bump show -f buildVars.py -p \"'addon_version': '(\d+\.\d+\.\d+)'\"" + {{.SHELL}} -c "bump show -f pyproject.toml -p \"version = .(\d+\.\d+\.\d+).\"" + {{else}} + {{.SHELL}} -c "bump {{.CLI_ARGS}} -w -f buildVars.py -p \"'addon_version': '(\d+\.\d+\.\d+)'\"" + {{.SHELL}} -c "bump {{.CLI_ARGS}} -w -f pyproject.toml -p \"version = .(\d+\.\d+\.\d+).\"" + {{end}}