Release version 0.7.1
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
## [0.7.1] - 2025-12-09
|
||||||
|
|
||||||
|
* Fix floating 'latest' tag logic: dereference annotated target (vX.Y.Z^{}), add tag message to avoid Git errors, ensure best-effort update without blocking releases, and update unit tests (see ChatGPT conversation: https://chatgpt.com/share/69383024-efa4-800f-a875-129b81fa40ff).
|
||||||
|
|
||||||
|
|
||||||
## [0.7.0] - 2025-12-09
|
## [0.7.0] - 2025-12-09
|
||||||
|
|
||||||
* Add Git helpers for branch sync and floating 'latest' tag in the release workflow, ensure main/master are updated from origin before tagging, and extend unit/e2e tests including 'pkgmgr release --help' coverage (see ChatGPT conversation: https://chatgpt.com/share/69383024-efa4-800f-a875-129b81fa40ff)
|
* Add Git helpers for branch sync and floating 'latest' tag in the release workflow, ensure main/master are updated from origin before tagging, and extend unit/e2e tests including 'pkgmgr release --help' coverage (see ChatGPT conversation: https://chatgpt.com/share/69383024-efa4-800f-a875-129b81fa40ff)
|
||||||
|
|||||||
2
PKGBUILD
2
PKGBUILD
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Kevin Veen-Birkenbach <info@veen.world>
|
# Maintainer: Kevin Veen-Birkenbach <info@veen.world>
|
||||||
|
|
||||||
pkgname=package-manager
|
pkgname=package-manager
|
||||||
pkgver=0.7.0
|
pkgver=0.7.1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Local-flake wrapper for Kevin's package-manager (Nix-based)."
|
pkgdesc="Local-flake wrapper for Kevin's package-manager (Nix-based)."
|
||||||
arch=('any')
|
arch=('any')
|
||||||
|
|||||||
6
debian/changelog
vendored
6
debian/changelog
vendored
@@ -1,3 +1,9 @@
|
|||||||
|
package-manager (0.7.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Fix floating 'latest' tag logic: dereference annotated target (vX.Y.Z^{}), add tag message to avoid Git errors, ensure best-effort update without blocking releases, and update unit tests (see ChatGPT conversation: https://chatgpt.com/share/69383024-efa4-800f-a875-129b81fa40ff).
|
||||||
|
|
||||||
|
-- Kevin Veen-Birkenbach <kevin@veen.world> Tue, 09 Dec 2025 15:26:54 +0100
|
||||||
|
|
||||||
package-manager (0.7.0-1) unstable; urgency=medium
|
package-manager (0.7.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
* Add Git helpers for branch sync and floating 'latest' tag in the release workflow, ensure main/master are updated from origin before tagging, and extend unit/e2e tests including 'pkgmgr release --help' coverage (see ChatGPT conversation: https://chatgpt.com/share/69383024-efa4-800f-a875-129b81fa40ff)
|
* Add Git helpers for branch sync and floating 'latest' tag in the release workflow, ensure main/master are updated from origin before tagging, and extend unit/e2e tests including 'pkgmgr release --help' coverage (see ChatGPT conversation: https://chatgpt.com/share/69383024-efa4-800f-a875-129b81fa40ff)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
rec {
|
rec {
|
||||||
pkgmgr = pyPkgs.buildPythonApplication {
|
pkgmgr = pyPkgs.buildPythonApplication {
|
||||||
pname = "package-manager";
|
pname = "package-manager";
|
||||||
version = "0.7.0";
|
version = "0.7.1";
|
||||||
|
|
||||||
# Use the git repo as source
|
# Use the git repo as source
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Name: package-manager
|
Name: package-manager
|
||||||
Version: 0.7.0
|
Version: 0.7.1
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Wrapper that runs Kevin's package-manager via Nix flake
|
Summary: Wrapper that runs Kevin's package-manager via Nix flake
|
||||||
|
|
||||||
|
|||||||
@@ -171,8 +171,15 @@ def _release_impl(
|
|||||||
run_git_command("git push origin --tags")
|
run_git_command("git push origin --tags")
|
||||||
|
|
||||||
# Move 'latest' to the new release tag so the newest SemVer is always
|
# Move 'latest' to the new release tag so the newest SemVer is always
|
||||||
# marked as latest.
|
# marked as latest. This is best-effort and must not break the release.
|
||||||
update_latest_tag(new_tag, preview=False)
|
try:
|
||||||
|
update_latest_tag(new_tag, preview=False)
|
||||||
|
except GitError as exc: # pragma: no cover
|
||||||
|
print(
|
||||||
|
f"[WARN] Failed to update floating 'latest' tag for {new_tag}: {exc}\n"
|
||||||
|
"[WARN] The release itself completed successfully; only the "
|
||||||
|
"'latest' tag was not updated."
|
||||||
|
)
|
||||||
|
|
||||||
print(f"Release {new_ver_str} completed.")
|
print(f"Release {new_ver_str} completed.")
|
||||||
|
|
||||||
|
|||||||
@@ -71,12 +71,25 @@ def sync_branch_with_remote(branch: str, preview: bool = False) -> None:
|
|||||||
def update_latest_tag(new_tag: str, preview: bool = False) -> None:
|
def update_latest_tag(new_tag: str, preview: bool = False) -> None:
|
||||||
"""
|
"""
|
||||||
Move the floating 'latest' tag to the newly created release tag.
|
Move the floating 'latest' tag to the newly created release tag.
|
||||||
|
|
||||||
|
Implementation details:
|
||||||
|
- We explicitly dereference the tag object via `<tag>^{}` so that
|
||||||
|
'latest' always points at the underlying commit, not at another tag.
|
||||||
|
- We create/update 'latest' as an annotated tag with a short message so
|
||||||
|
Git configurations that enforce annotated/signed tags do not fail
|
||||||
|
with "no tag message".
|
||||||
"""
|
"""
|
||||||
print(f"[INFO] Updating 'latest' tag to point at {new_tag}...")
|
target_ref = f"{new_tag}^{{}}"
|
||||||
|
print(f"[INFO] Updating 'latest' tag to point at {new_tag} (commit {target_ref})...")
|
||||||
|
|
||||||
if preview:
|
if preview:
|
||||||
print(f"[PREVIEW] Would run: git tag -f latest {new_tag}")
|
print(f"[PREVIEW] Would run: git tag -f -a latest {target_ref} "
|
||||||
|
f'-m "Floating latest tag for {new_tag}"')
|
||||||
print("[PREVIEW] Would run: git push origin latest --force")
|
print("[PREVIEW] Would run: git push origin latest --force")
|
||||||
return
|
return
|
||||||
|
|
||||||
run_git_command(f"git tag -f latest {new_tag}")
|
run_git_command(
|
||||||
|
f'git tag -f -a latest {target_ref} '
|
||||||
|
f'-m "Floating latest tag for {new_tag}"'
|
||||||
|
)
|
||||||
run_git_command("git push origin latest --force")
|
run_git_command("git push origin latest --force")
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "package-manager"
|
name = "package-manager"
|
||||||
version = "0.7.0"
|
version = "0.7.1"
|
||||||
description = "Kevin's package-manager tool (pkgmgr)"
|
description = "Kevin's package-manager tool (pkgmgr)"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
|
|||||||
@@ -75,16 +75,19 @@ class TestUpdateLatestTag(unittest.TestCase):
|
|||||||
mock_run_git_command.assert_not_called()
|
mock_run_git_command.assert_not_called()
|
||||||
|
|
||||||
@patch("pkgmgr.actions.release.git_ops.run_git_command")
|
@patch("pkgmgr.actions.release.git_ops.run_git_command")
|
||||||
def test_update_latest_tag_real_calls_git(
|
def test_update_latest_tag_real_calls_git_with_dereference_and_message(
|
||||||
self,
|
self,
|
||||||
mock_run_git_command,
|
mock_run_git_command,
|
||||||
) -> None:
|
) -> None:
|
||||||
update_latest_tag("v1.2.3", preview=False)
|
update_latest_tag("v1.2.3", preview=False)
|
||||||
|
|
||||||
calls = [c.args[0] for c in mock_run_git_command.call_args_list]
|
calls = [c.args[0] for c in mock_run_git_command.call_args_list]
|
||||||
self.assertIn("git tag -f latest v1.2.3", calls)
|
# Must dereference the tag object and create an annotated tag with message
|
||||||
|
self.assertIn(
|
||||||
|
'git tag -f -a latest v1.2.3^{} -m "Floating latest tag for v1.2.3"',
|
||||||
|
calls,
|
||||||
|
)
|
||||||
self.assertIn("git push origin latest --force", calls)
|
self.assertIn("git push origin latest --force", calls)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
Reference in New Issue
Block a user