mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2025-01-15 19:00:05 +00:00
make build reproducible
see https://reproducible-builds.org/ for why this is good
This commit is contained in:
parent
fcf7df069d
commit
29b37fb310
@ -33,10 +33,12 @@ from __future__ import print_function
|
||||
|
||||
import datetime
|
||||
import errno
|
||||
import os
|
||||
import os.path
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
|
||||
def mkdir_p(directory):
|
||||
@ -108,7 +110,9 @@ def describe(directory):
|
||||
return command_output(
|
||||
['git', 'rev-parse', 'HEAD'], directory).rstrip().decode()
|
||||
except:
|
||||
return 'unknown hash, {}'.format(datetime.date.today().isoformat())
|
||||
return 'unknown hash, {}'.format(datetime.date.fromtimestamp(
|
||||
int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
|
||||
).isoformat())
|
||||
|
||||
|
||||
def main():
|
||||
|
Loading…
Reference in New Issue
Block a user