Skip to content

Commit

Permalink
Fix publish
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Sep 14, 2022
1 parent ea21099 commit 8a69591
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions c2cciutils/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@ def pip(
if requirement_split[0] == "poetry-core":
use_poetry = True
if use_poetry:
if version_type == "version_tag":
pyproject.get("tool", {})["poetry"]["version"] = version
pyproject.get("tool", {})["poetry-dynamic-versioning"]["enable"] = False
with open(os.path.join(cwd, "pyproject.toml"), "w", encoding="utf-8") as project_file:
project_file.write(tomlkit.dumps(pyproject))
with tempfile.TemporaryDirectory(prefix="c2cciutils-publish-venv") as venv:
subprocess.run(["python3", "-m", "venv", venv], check=True)
subprocess.run([f"{venv}/bin/pip", "install", "poetry"], check=True)
Expand Down

0 comments on commit 8a69591

Please sign in to comment.