mirror of
https://github.com/fmtlib/fmt.git
synced 2026-06-15 08:26:13 +08:00
Fix release script
This commit is contained in:
parent
9764b90ddb
commit
9afcd929ba
@ -35,6 +35,9 @@ class Git:
|
|||||||
def clone(self, *args):
|
def clone(self, *args):
|
||||||
return self.call('clone', list(args) + [self.dir])
|
return self.call('clone', list(args) + [self.dir])
|
||||||
|
|
||||||
|
def fetch(self, *args):
|
||||||
|
return self.call('fetch', args, cwd=self.dir)
|
||||||
|
|
||||||
def commit(self, *args):
|
def commit(self, *args):
|
||||||
return self.call('commit', args, cwd=self.dir)
|
return self.call('commit', args, cwd=self.dir)
|
||||||
|
|
||||||
@ -56,8 +59,11 @@ class Git:
|
|||||||
|
|
||||||
def clean_checkout(repo, branch):
|
def clean_checkout(repo, branch):
|
||||||
repo.clean('-f', '-d')
|
repo.clean('-f', '-d')
|
||||||
repo.reset('--hard')
|
repo.fetch('origin')
|
||||||
repo.checkout(branch)
|
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:
|
class Runner:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user