diff options
author | Bernhard M. Wiedemann <bwiedemann@suse.de> | 2018-10-14 02:45:24 (GMT) |
---|---|---|
committer | Bernhard M. Wiedemann <bwiedemann@suse.de> | 2018-10-15 02:29:56 (GMT) |
commit | a61f52da75cad382d482ae13a9e3d30d4870f87b (patch) | |
tree | 53f954982e376354227df2aff5076d169561f9bc /doc | |
parent | 0c20ae2e5d1e093a3993f94eba454ca110cf1dd3 (diff) | |
download | SCons-a61f52da75cad382d482ae13a9e3d30d4870f87b.zip SCons-a61f52da75cad382d482ae13a9e3d30d4870f87b.tar.gz SCons-a61f52da75cad382d482ae13a9e3d30d4870f87b.tar.bz2 |
Allow to override build date with SOURCE_DATE_EPOCH
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
Also consistently use ISO 8601 date format
to be understood everywhere.
Also use gmtime to be independent of timezone.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/SConscript | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/SConscript b/doc/SConscript index 82b29a6..5f3d559 100644 --- a/doc/SConscript +++ b/doc/SConscript @@ -131,8 +131,9 @@ if skip_doc: if not os.path.isdir(scdir): os.makedirs(scdir) - import datetime - today = datetime.date.today().strftime("%m/%d/%Y") + import time + today = time.strftime("%Y-%m-%d", + time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) version = env.subst('$VERSION') for m in man_page_list: man, _ = os.path.splitext(m) |