Compare commits
2 Commits
0d864867cd
...
v1.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a69a83d71 | ||
|
|
0ec4ccbe40 |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,3 +1,15 @@
|
|||||||
|
## [1.2.0] - 2025-12-12
|
||||||
|
|
||||||
|
* **Release workflow overhaul**
|
||||||
|
|
||||||
|
* Introduced a fully structured release workflow with clear phases and safeguards
|
||||||
|
* Added preview-first releases with explicit confirmation before execution
|
||||||
|
* Automatic handling of *latest* tag when a release is the newest version
|
||||||
|
* Optional branch closing after successful releases with interactive confirmation
|
||||||
|
* Improved safety by syncing with remote before any changes
|
||||||
|
* Clear separation of concerns (workflow, git handling, prompts, versioning)
|
||||||
|
|
||||||
|
|
||||||
## [1.1.0] - 2025-12-12
|
## [1.1.0] - 2025-12-12
|
||||||
|
|
||||||
* Added *branch drop* for destructive branch deletion and introduced *--force/-f* flags for branch close and branch drop to skip confirmation prompts.
|
* Added *branch drop* for destructive branch deletion and introduced *--force/-f* flags for branch close and branch drop to skip confirmation prompts.
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
rec {
|
rec {
|
||||||
pkgmgr = pyPkgs.buildPythonApplication {
|
pkgmgr = pyPkgs.buildPythonApplication {
|
||||||
pname = "package-manager";
|
pname = "package-manager";
|
||||||
version = "1.1.0";
|
version = "1.2.0";
|
||||||
|
|
||||||
# Use the git repo as source
|
# Use the git repo as source
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "package-manager"
|
name = "package-manager"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
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"
|
||||||
|
|||||||
@@ -42,15 +42,14 @@ def ensure_clean_and_synced(preview: bool = False) -> None:
|
|||||||
return
|
return
|
||||||
|
|
||||||
if preview:
|
if preview:
|
||||||
print("[PREVIEW] Would run: git fetch --prune --tags")
|
print("[PREVIEW] Would run: git fetch origin --prune --tags --force")
|
||||||
print("[PREVIEW] Would run: git pull --ff-only")
|
print("[PREVIEW] Would run: git pull --ff-only")
|
||||||
return
|
return
|
||||||
|
|
||||||
print("[INFO] Syncing with remote before making any changes...")
|
print("[INFO] Syncing with remote before making any changes...")
|
||||||
run_git_command("git fetch --prune --tags")
|
run_git_command("git fetch origin --prune --tags --force")
|
||||||
run_git_command("git pull --ff-only")
|
run_git_command("git pull --ff-only")
|
||||||
|
|
||||||
|
|
||||||
def is_highest_version_tag(tag: str) -> bool:
|
def is_highest_version_tag(tag: str) -> bool:
|
||||||
"""
|
"""
|
||||||
Return True if `tag` is the highest version among all tags matching v*.
|
Return True if `tag` is the highest version among all tags matching v*.
|
||||||
|
|||||||
@@ -109,10 +109,11 @@ class TestEnsureCleanAndSynced(unittest.TestCase):
|
|||||||
ensure_clean_and_synced(preview=False)
|
ensure_clean_and_synced(preview=False)
|
||||||
|
|
||||||
called_cmds = [c.args[0] for c in mock_run.call_args_list]
|
called_cmds = [c.args[0] for c in mock_run.call_args_list]
|
||||||
self.assertIn("git fetch --prune --tags", called_cmds)
|
self.assertIn("git fetch origin --prune --tags --force", called_cmds)
|
||||||
self.assertIn("git pull --ff-only", called_cmds)
|
self.assertIn("git pull --ff-only", called_cmds)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class TestIsHighestVersionTag(unittest.TestCase):
|
class TestIsHighestVersionTag(unittest.TestCase):
|
||||||
@patch("pkgmgr.actions.release.git_ops.subprocess.run")
|
@patch("pkgmgr.actions.release.git_ops.subprocess.run")
|
||||||
def test_is_highest_version_tag_no_tags_true(self, mock_run) -> None:
|
def test_is_highest_version_tag_no_tags_true(self, mock_run) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user