diff --git a/.bumpversion.toml b/.bumpversion.toml new file mode 100644 index 00000000..e4dccdf2 --- /dev/null +++ b/.bumpversion.toml @@ -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}\"" \ No newline at end of file diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 767054e0..a79943cc 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -37,7 +37,7 @@ 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]') @@ -45,7 +45,7 @@ jobs: 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]') @@ -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 diff --git a/partcad-cli/pyproject.toml b/partcad-cli/pyproject.toml index 4a47b60f..1b103275 100644 --- a/partcad-cli/pyproject.toml +++ b/partcad-cli/pyproject.toml @@ -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"] @@ -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" diff --git a/partcad/pyproject.toml b/partcad/pyproject.toml index 930b7822..8b4e5ec8 100644 --- a/partcad/pyproject.toml +++ b/partcad/pyproject.toml @@ -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"] @@ -11,7 +12,7 @@ authors = [ maintainers = [ {name = "Roman Kuzmenko", email = "openvmp@proton.me" } ] -dynamic = ["version", "dependencies"] +dynamic = ["dependencies"] classifiers = [ "Programming Language :: Python :: 3", @@ -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"