mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-05 21:43:07 +02:00
Don't retrieve repository's SHA in prebuild
Doing this means source can only be built when checked out from git, and can't be build from an archive.
This commit is contained in:
parent
b7c4e7319d
commit
526f526aa6
1 changed files with 0 additions and 17 deletions
17
prebuild.py
17
prebuild.py
|
@ -58,22 +58,6 @@ class TrackableLogger(logging.Logger):
|
|||
logging.setLoggerClass(TrackableLogger)
|
||||
logger = logging.getLogger('prebuild')
|
||||
|
||||
def headSha():
|
||||
if shutil.which('git') is None:
|
||||
logger.warn("Unable to find git executable, can't caclulate commit ID")
|
||||
return '0xDEADBEEF'
|
||||
repo_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
git = subprocess.Popen(
|
||||
'git rev-parse --short HEAD',
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||
shell=True, cwd=repo_dir, universal_newlines=True,
|
||||
)
|
||||
stdout, _ = git.communicate()
|
||||
sha = stdout.split('\n')[0]
|
||||
if not sha:
|
||||
raise RuntimeError("couldn't find git sha for repository {}".format(repo_dir))
|
||||
return sha
|
||||
|
||||
@contextmanager
|
||||
def timer(name):
|
||||
''' Print the elapsed time a context's execution takes to execute '''
|
||||
|
@ -120,7 +104,6 @@ def main():
|
|||
if args.ci_build:
|
||||
logging.basicConfig(datefmt='%H:%M:%S', format='%(asctime)s %(guid)s %(message)s', level=logging.INFO)
|
||||
|
||||
logger.info('sha=%s' % headSha())
|
||||
logger.info('start')
|
||||
|
||||
# OS dependent information
|
||||
|
|
Loading…
Reference in a new issue