Skip to content

Commit

Permalink
Fixed bump-my-version after the repo split
Browse files Browse the repository at this point in the history
  • Loading branch information
openvmp committed Jan 11, 2024
1 parent 3b6c9b6 commit 0d44c92
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 24 deletions.
32 changes: 32 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[tool.bumpversion]
current_version = "0.2.20"
commit = "true"
commit_args = "--no-verify"
tag = "true"
tag_name = "{new_version}"
message = "Version updated from {current_version} to {new_version}"

[[tool.bumpversion.files]]
filename = "partcad/pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""

[[tool.bumpversion.files]]
filename = "partcad-cli/pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""

[[tool.bumpversion.files]]
filename = "partcad-cli/requirements.txt"
search = "partcad=={current_version}"
replace = "partcad=={new_version}"

[[tool.bumpversion.files]]
filename = "partcad/src/partcad/__init__.py"
search = "__version__: str = \"{current_version}\""
replace = "__version__: str = \"{new_version}\""

[[tool.bumpversion.files]]
filename = "partcad-cli/src/partcad_cli/__init__.py"
search = "__version__: str = \"{current_version}\""
replace = "__version__: str = \"{new_version}\""
6 changes: 3 additions & 3 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ jobs:
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
run: |
(cd partcad && bump-my-version bump major)
bump-my-version bump major
echo "SKIPBUMP=TRUE" >> $GITHUB_ENV
if: startsWith(github.event.head_commit.message, '[MAJOR]')

- name: Bump Minor Version
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
run: |
(cd partcad && bump-my-version bump minor)
bump-my-version bump minor
echo "SKIPBUMP=TRUE" >> $GITHUB_ENV
if: startsWith(github.event.head_commit.message, '[FEATURE]')

Expand All @@ -54,7 +54,7 @@ jobs:
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
run: |
(cd partcad && bump-my-version bump patch)
bump-my-version bump patch
if: env.SKIPBUMP == 'FALSE'

- name: Commit version change to master
Expand Down
9 changes: 6 additions & 3 deletions partcad-cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ maintainers = [
]
dynamic = ["dependencies"]

classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]

[tool.setuptools.package-data]
"partcad_cli.template" = ["*.yaml"]

Expand All @@ -23,9 +29,6 @@ pc = "partcad_cli:main_cli"
[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.pytest.ini_options]
pythonpath = "src"

[project.urls]
Homepage = "https://github.com/openvmp/partcad"
Issues = "https://github.com/openvmp/partcad/issues"
20 changes: 2 additions & 18 deletions partcad/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[project]
name = "partcad"
version = "0.2.20"
description = "Package manager for CAD models and a modelling framework"
readme = "README.md"
keywords = ["cadquery", "build123d", "cad", "design", "openscad", "step", "stl"]
Expand All @@ -11,7 +12,7 @@ authors = [
maintainers = [
{name = "Roman Kuzmenko", email = "[email protected]" }
]
dynamic = ["version", "dependencies"]
dynamic = ["dependencies"]

classifiers = [
"Programming Language :: Python :: 3",
Expand All @@ -23,25 +24,8 @@ classifiers = [
"partcad.wrappers" = ["*.py"]

[tool.setuptools.dynamic]
version = {attr = "partcad.__version__"}
dependencies = {file = ["requirements.txt"]}

[tool.bumpversion]
current_version = "0.2.20"
commit = "true"
commit_args = "--no-verify"
tag = "true"
tag_name = "{new_version}"
message = "Version updated from {current_version} to {new_version}"

[[tool.bumpversion.files]]
filename = [
"src/partcad/__init__.py",
"../partcad-cli/src/partcad_cli/__init__.py",
"../partcad-cli/pyproject.toml",
"../partcad-cli/requirements.txt"
]

[project.urls]
Homepage = "https://github.com/openvmp/partcad"
Issues = "https://github.com/openvmp/partcad/issues"

0 comments on commit 0d44c92

Please sign in to comment.