mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-10 14:41:43 +00:00
aedi: do git pull if not checking out particular commit
This commit is contained in:
parent
405d1a3b1f
commit
8250875909
1 changed files with 7 additions and 0 deletions
|
@ -78,6 +78,7 @@ class BuildState:
|
|||
|
||||
if self.checkout_commit:
|
||||
checkout_args = (self.checkout_commit,)
|
||||
need_pull = False
|
||||
else:
|
||||
args = ('git', 'show-ref', '--quiet', 'refs/heads/' + branch)
|
||||
branch_exists = 0 == subprocess.run(args, cwd=self.source).returncode
|
||||
|
@ -87,9 +88,15 @@ class BuildState:
|
|||
else:
|
||||
checkout_args = ('-b', branch, 'origin/' + branch)
|
||||
|
||||
need_pull = True
|
||||
|
||||
args = ('git', 'checkout') + checkout_args
|
||||
subprocess.run(args, cwd=self.source, check=True)
|
||||
|
||||
if need_pull:
|
||||
args = ('git', 'pull')
|
||||
subprocess.run(args, cwd=self.source, check=True)
|
||||
|
||||
def download_source(self, url: str, checksum: str):
|
||||
if self.external_source:
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue