mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-22 03:51:33 +00:00
aedi: print source version when building from git repository
This commit is contained in:
parent
bd5bd08481
commit
4645a58fec
2 changed files with 14 additions and 0 deletions
|
@ -153,6 +153,9 @@ class Builder(object):
|
||||||
|
|
||||||
self._create_prefix_directory()
|
self._create_prefix_directory()
|
||||||
|
|
||||||
|
if version := state.source_version():
|
||||||
|
print(f'Building {version}')
|
||||||
|
|
||||||
if target.multi_platform and not state.xcode:
|
if target.multi_platform and not state.xcode:
|
||||||
self._build_multiple_platforms(target)
|
self._build_multiple_platforms(target)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -256,3 +256,14 @@ class BuildState:
|
||||||
if sdk_version := self.sdk_version():
|
if sdk_version := self.sdk_version():
|
||||||
if sdk_version < minimum_version:
|
if sdk_version < minimum_version:
|
||||||
raise RuntimeError('Minimum SDK version requirement is not met')
|
raise RuntimeError('Minimum SDK version requirement is not met')
|
||||||
|
|
||||||
|
def source_version(self):
|
||||||
|
version = ''
|
||||||
|
|
||||||
|
args = ('git', f'--git-dir={self.source}/.git', 'describe', '--tags')
|
||||||
|
git_describe = subprocess.run(args, env=self.environment, capture_output=True)
|
||||||
|
|
||||||
|
if git_describe.returncode == 0:
|
||||||
|
version = git_describe.stdout.decode('ascii')
|
||||||
|
|
||||||
|
return version
|
||||||
|
|
Loading…
Reference in a new issue