mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-22 03:51:33 +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:
|
if self.checkout_commit:
|
||||||
checkout_args = (self.checkout_commit,)
|
checkout_args = (self.checkout_commit,)
|
||||||
|
need_pull = False
|
||||||
else:
|
else:
|
||||||
args = ('git', 'show-ref', '--quiet', 'refs/heads/' + branch)
|
args = ('git', 'show-ref', '--quiet', 'refs/heads/' + branch)
|
||||||
branch_exists = 0 == subprocess.run(args, cwd=self.source).returncode
|
branch_exists = 0 == subprocess.run(args, cwd=self.source).returncode
|
||||||
|
@ -87,9 +88,15 @@ class BuildState:
|
||||||
else:
|
else:
|
||||||
checkout_args = ('-b', branch, 'origin/' + branch)
|
checkout_args = ('-b', branch, 'origin/' + branch)
|
||||||
|
|
||||||
|
need_pull = True
|
||||||
|
|
||||||
args = ('git', 'checkout') + checkout_args
|
args = ('git', 'checkout') + checkout_args
|
||||||
subprocess.run(args, cwd=self.source, check=True)
|
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):
|
def download_source(self, url: str, checksum: str):
|
||||||
if self.external_source:
|
if self.external_source:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue