**fix(release): force-fetch remote tags and align tests**
* Treat remote tags as the source of truth by force-fetching tags from *origin* * Update preview output to reflect the real fetch behavior * Align unit tests with the new forced tag fetch command https://chatgpt.com/share/693bdfc3-b8b4-800f-8adc-b1dc63c56a89
This commit is contained in:
@@ -109,10 +109,11 @@ class TestEnsureCleanAndSynced(unittest.TestCase):
|
||||
ensure_clean_and_synced(preview=False)
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
||||
class TestIsHighestVersionTag(unittest.TestCase):
|
||||
@patch("pkgmgr.actions.release.git_ops.subprocess.run")
|
||||
def test_is_highest_version_tag_no_tags_true(self, mock_run) -> None:
|
||||
|
||||
Reference in New Issue
Block a user