Skip to content

Commit

Permalink
Prepare for dynamic versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
medihack committed Sep 27, 2024
1 parent 476cdee commit 592bb8b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ RUN pipx install invoke && \
invoke --print-completion-script=bash >> ~/.bash_completion

RUN pipx install poetry && \
poetry completions bash >> ~/.bash_completion
pipx inject poetry "poetry-dynamic-versioning[plugin]" && \
poetry completions bash >> ~/.bash_completion
3 changes: 2 additions & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# Poetry is already installed in the base Gitpod Python image,
# but we need to upgrade it
RUN poetry self update && \
poetry completions bash >> ~/.bash_completion
poetry self add "poetry-dynamic-versioning[plugin]" && \
poetry completions bash >> ~/.bash_completion
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "radis-client"
version = "0.4.0"
version = "0.0.0"
description = "RADIS client library to connect to a RADIS server."
authors = ["Kai Schlamp <[email protected]>"]
license = "GPL-3.0-or-later"
Expand Down Expand Up @@ -64,6 +64,10 @@ source = ["radis_client"]
skip_empty = true
show_missing = true

[tool.poetry-dynamic-versioning]
enable = true
pattern = '(?P<base>\d+(\.\d+)*)([-._]?((?P<stage>[a-zA-Z]+)[-._]?(?P<revision>\d+)?))?$'

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def lint(ctx: Context):
def publish_client(ctx: Context):
"""Publish RADIS Client to PyPI
- Make sure you released a new version with tag in GitHub
- Make sure PyPI API token is set: poetry config pypi-token.pypi your-api-token
- Make sure to bump the version (see `bump_version` above)
- Execute with `invoke publish-client`
"""
ctx.run("poetry publish --build", pty=True)

0 comments on commit 592bb8b

Please sign in to comment.