Compare commits
3
Commits
810d27badc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a4bf137ac | ||
|
|
ea82d91b75 | ||
|
|
1c0a4abcbb |
No files matched your search
@@ -1,5 +1,35 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.1] - 2026-10-31
|
||||
|
||||
Fixed:
|
||||
|
||||
- Release: tool-only or dynamic-version pyproject.toml is skipped, no crash
|
||||
|
||||
Upgrade notes:
|
||||
|
||||
- Container: no 2.1.0 image reached GHCR; the two notes below carry over
|
||||
- Release: a version file ahead of the newest tag now raises the next version
|
||||
- Branch: *gc --apply* and *purge* refuse to run inside a PID sandbox
|
||||
|
||||
## [2.1.0] - 2026-10-31
|
||||
|
||||
Added:
|
||||
|
||||
- Branch: *pkgmgr branch gc* removes merged clean branches, worktrees, stacks
|
||||
- Branch: *gc* only prints its plan; *--apply* acts, *--json* for scripts
|
||||
- Branch: *pkgmgr branch purge* deletes unmerged or dirty items after y/N
|
||||
- Release: Cargo.toml version and its Cargo.lock entry follow the release
|
||||
|
||||
Changed:
|
||||
|
||||
- Release: starts from the highest version in the tag and all version files
|
||||
|
||||
Upgrade notes:
|
||||
|
||||
- Release: a version file ahead of the newest tag now raises the next version
|
||||
- Branch: *gc --apply* and *purge* refuse to run inside a PID sandbox
|
||||
|
||||
## [2.0.5] - 2026-10-29
|
||||
|
||||
Fixed:
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
rec {
|
||||
pkgmgr = pyPkgs.buildPythonApplication {
|
||||
pname = "package-manager";
|
||||
version = "2.0.5";
|
||||
version = "2.1.1";
|
||||
|
||||
# Use the git repo as source
|
||||
src = ./.;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Maintainer: Kevin Veen-Birkenbach <info@veen.world>
|
||||
|
||||
pkgname=package-manager
|
||||
pkgver=2.0.5
|
||||
pkgver=2.1.1
|
||||
pkgrel=1
|
||||
pkgdesc="Local-flake wrapper for Kevin's package-manager (Nix-based)."
|
||||
arch=('any')
|
||||
|
||||
@@ -1,3 +1,37 @@
|
||||
package-manager (2.1.1-1) unstable; urgency=medium
|
||||
|
||||
Fixed:
|
||||
|
||||
- Release: tool-only or dynamic-version pyproject.toml is skipped, no crash
|
||||
|
||||
Upgrade notes:
|
||||
|
||||
- Container: no 2.1.0 image reached GHCR; the two notes below carry over
|
||||
- Release: a version file ahead of the newest tag now raises the next version
|
||||
- Branch: *gc --apply* and *purge* refuse to run inside a PID sandbox
|
||||
|
||||
-- Kevin Veen-Birkenbach <kevin@veen.world> Sat, 31 Oct 2026 18:47:35 +0100
|
||||
|
||||
package-manager (2.1.0-1) unstable; urgency=medium
|
||||
|
||||
Added:
|
||||
|
||||
- Branch: *pkgmgr branch gc* removes merged clean branches, worktrees, stacks
|
||||
- Branch: *gc* only prints its plan; *--apply* acts, *--json* for scripts
|
||||
- Branch: *pkgmgr branch purge* deletes unmerged or dirty items after y/N
|
||||
- Release: Cargo.toml version and its Cargo.lock entry follow the release
|
||||
|
||||
Changed:
|
||||
|
||||
- Release: starts from the highest version in the tag and all version files
|
||||
|
||||
Upgrade notes:
|
||||
|
||||
- Release: a version file ahead of the newest tag now raises the next version
|
||||
- Branch: *gc --apply* and *purge* refuse to run inside a PID sandbox
|
||||
|
||||
-- Kevin Veen-Birkenbach <kevin@veen.world> Sat, 31 Oct 2026 14:38:54 +0100
|
||||
|
||||
package-manager (2.0.5-1) unstable; urgency=medium
|
||||
|
||||
Fixed:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Name: package-manager
|
||||
Version: 2.0.5
|
||||
Version: 2.1.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Wrapper that runs Kevin's package-manager via Nix flake
|
||||
|
||||
@@ -74,6 +74,34 @@ echo ">>> package-manager removed. Nix itself was not removed."
|
||||
/usr/lib/package-manager/
|
||||
|
||||
%changelog
|
||||
* Sat Oct 31 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 2.1.1-1
|
||||
- Fixed:
|
||||
|
||||
- - Release: tool-only or dynamic-version pyproject.toml is skipped, no crash
|
||||
|
||||
- Upgrade notes:
|
||||
|
||||
- - Container: no 2.1.0 image reached GHCR; the two notes below carry over
|
||||
- - Release: a version file ahead of the newest tag now raises the next version
|
||||
- - Branch: *gc --apply* and *purge* refuse to run inside a PID sandbox
|
||||
|
||||
* Sat Oct 31 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 2.1.0-1
|
||||
- Added:
|
||||
|
||||
- - Branch: *pkgmgr branch gc* removes merged clean branches, worktrees, stacks
|
||||
- - Branch: *gc* only prints its plan; *--apply* acts, *--json* for scripts
|
||||
- - Branch: *pkgmgr branch purge* deletes unmerged or dirty items after y/N
|
||||
- - Release: Cargo.toml version and its Cargo.lock entry follow the release
|
||||
|
||||
- Changed:
|
||||
|
||||
- - Release: starts from the highest version in the tag and all version files
|
||||
|
||||
- Upgrade notes:
|
||||
|
||||
- - Release: a version file ahead of the newest tag now raises the next version
|
||||
- - Branch: *gc --apply* and *purge* refuse to run inside a PID sandbox
|
||||
|
||||
* Thu Oct 29 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 2.0.5-1
|
||||
- Fixed:
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "kpmx"
|
||||
version = "2.0.5"
|
||||
version = "2.1.1"
|
||||
description = "Kevin's package-manager tool (pkgmgr)"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
|
||||
@@ -3,6 +3,11 @@ from __future__ import annotations
|
||||
import os
|
||||
import re
|
||||
|
||||
try:
|
||||
import tomllib
|
||||
except ImportError:
|
||||
import tomli as tomllib # type: ignore
|
||||
|
||||
|
||||
def update_pyproject_version(
|
||||
pyproject_path: str, new_version: str, preview: bool = False
|
||||
@@ -18,6 +23,11 @@ def update_pyproject_version(
|
||||
print(f"[WARN] Could not read pyproject.toml: {exc}")
|
||||
return
|
||||
|
||||
project = tomllib.loads(content).get("project")
|
||||
if project is None or "version" in project.get("dynamic", []):
|
||||
print("[INFO] pyproject.toml declares no static version, skipping.")
|
||||
return
|
||||
|
||||
m = re.search(r"(?ms)^\s*\[project\]\s*$.*?(?=^\s*\[|\Z)", content)
|
||||
if not m:
|
||||
raise RuntimeError("Missing [project] section in pyproject.toml")
|
||||
|
||||
@@ -88,12 +88,15 @@ class TestUpdatePyprojectVersion(unittest.TestCase):
|
||||
|
||||
self.assertIn("Missing version key", str(cm.exception))
|
||||
|
||||
def test_update_pyproject_version_raises_when_project_section_missing(self) -> None:
|
||||
def test_update_pyproject_version_skips_tool_only_pyproject(self) -> None:
|
||||
original = (
|
||||
textwrap.dedent(
|
||||
"""
|
||||
name = "example"
|
||||
version = "0.1.0"
|
||||
[dependency-groups]
|
||||
lint = ["ruff==0.17.3"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 88
|
||||
"""
|
||||
).strip()
|
||||
+ "\n"
|
||||
@@ -104,10 +107,38 @@ class TestUpdatePyprojectVersion(unittest.TestCase):
|
||||
with open(path, "w", encoding="utf-8") as f:
|
||||
f.write(original)
|
||||
|
||||
with self.assertRaises(RuntimeError) as cm:
|
||||
update_pyproject_version(path, "1.2.3", preview=False)
|
||||
update_pyproject_version(path, "1.2.3", preview=False)
|
||||
|
||||
self.assertIn("Missing [project] section", str(cm.exception))
|
||||
with open(path, encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
|
||||
self.assertEqual(content, original)
|
||||
|
||||
def test_update_pyproject_version_skips_dynamic_version(self) -> None:
|
||||
original = (
|
||||
textwrap.dedent(
|
||||
"""
|
||||
[project]
|
||||
name = "example"
|
||||
dynamic = [
|
||||
"version",
|
||||
]
|
||||
"""
|
||||
).strip()
|
||||
+ "\n"
|
||||
)
|
||||
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
path = os.path.join(tmpdir, "pyproject.toml")
|
||||
with open(path, "w", encoding="utf-8") as f:
|
||||
f.write(original)
|
||||
|
||||
update_pyproject_version(path, "1.2.3", preview=False)
|
||||
|
||||
with open(path, encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
|
||||
self.assertEqual(content, original)
|
||||
|
||||
def test_update_pyproject_version_missing_file_is_skipped(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
|
||||
Reference in new issue
Block a user