feat: support config-free ERP app versioning
This commit is contained in:
1 parent
59e040994b
commit
75fdf8a822
5 files changed
+32
-102
No files matched your search
+1
-16
@@ -22,23 +22,8 @@ git commit -qm initial
|
||||
git remote add origin "${test_root}/remote.git"
|
||||
git push -qu origin main
|
||||
git switch -qc develop
|
||||
cat >> pyproject.toml <<'TOML'
|
||||
|
||||
[tool.bumpversion]
|
||||
current_version = "0.0.1"
|
||||
commit = false
|
||||
tag = false
|
||||
|
||||
[[tool.bumpversion.files]]
|
||||
filename = "erp_operations/__init__.py"
|
||||
search = '__version__ = "{current_version}"'
|
||||
replace = '__version__ = "{new_version}"'
|
||||
TOML
|
||||
git add pyproject.toml
|
||||
git commit -qm 'configure versioning'
|
||||
git push -qu origin develop
|
||||
|
||||
export INPUT_CONFIG_FILE=pyproject.toml
|
||||
export INPUT_VERSION_FILE=erp_operations/__init__.py
|
||||
export INPUT_BASE_BRANCH=main
|
||||
export INPUT_TARGET_BRANCH=develop
|
||||
@@ -53,7 +38,7 @@ export RUNNER_TEMP="${test_root}"
|
||||
export GITHUB_OUTPUT="${test_root}/output"
|
||||
|
||||
"${repo_root}/scripts/bump.sh"
|
||||
grep -q '^current_version = "0.0.2"$' pyproject.toml
|
||||
! grep -q '^\[tool.bumpversion\]' pyproject.toml
|
||||
grep -q '^__version__ = "0.0.2"$' erp_operations/__init__.py
|
||||
grep -q '^bumped=true$' "${GITHUB_OUTPUT}"
|
||||
grep -q '^previous-version=0.0.1$' "${GITHUB_OUTPUT}"
|
||||
|
||||
Reference in new issue
Block a user