From 9afcd929ba675d942371de8ca1832f9d5d09b4bd Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 2 Jun 2026 17:32:47 -0700 Subject: [PATCH] Fix release script --- support/release.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/support/release.py b/support/release.py index 4e34fe62..58206755 100755 --- a/support/release.py +++ b/support/release.py @@ -35,6 +35,9 @@ class Git: def clone(self, *args): return self.call('clone', list(args) + [self.dir]) + def fetch(self, *args): + return self.call('fetch', args, cwd=self.dir) + def commit(self, *args): return self.call('commit', args, cwd=self.dir) @@ -56,8 +59,11 @@ class Git: def clean_checkout(repo, branch): repo.clean('-f', '-d') - repo.reset('--hard') + repo.fetch('origin') repo.checkout(branch) + # Hard-reset to the remote so a reused clone picks up new commits + # instead of building from stale local state. + repo.reset('--hard', 'origin/' + branch) class Runner: