diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 0cadf52..22a774f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -14,4 +14,5 @@ RUN pipx install invoke && \ invoke --print-completion-script=bash >> ~/.bash_completion RUN pipx install poetry && \ - poetry completions bash >> ~/.bash_completion \ No newline at end of file + pipx inject poetry "poetry-dynamic-versioning[plugin]" && \ + poetry completions bash >> ~/.bash_completion diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 5586448..23282d1 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -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 \ No newline at end of file + poetry self add "poetry-dynamic-versioning[plugin]" && \ + poetry completions bash >> ~/.bash_completion diff --git a/pyproject.toml b/pyproject.toml index 0f3d7d9..782cb81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] license = "GPL-3.0-or-later" @@ -64,6 +64,10 @@ source = ["radis_client"] skip_empty = true show_missing = true +[tool.poetry-dynamic-versioning] +enable = true +pattern = '(?P\d+(\.\d+)*)([-._]?((?P[a-zA-Z]+)[-._]?(?P\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" diff --git a/tasks.py b/tasks.py index 4d2298a..ac5ed5c 100644 --- a/tasks.py +++ b/tasks.py @@ -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)