Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to override build date with SOURCE_DATE_EPOCH #3221

Merged
merged 1 commit into from
Oct 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ zip = whereis('zip')
#
date = ARGUMENTS.get('DATE')
if not date:
date = time.strftime("%Y/%m/%d %H:%M:%S", time.localtime(time.time()))
date = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))))

developer = ARGUMENTS.get('DEVELOPER')
if not developer:
Expand Down
5 changes: 3 additions & 2 deletions doc/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions src/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE
Three uses of variables not defined are changed.
- Some script changes in trying to find scons engine

From Bernhard M. Wiedemann:
- Allow to override build date with SOURCE_DATE_EPOCH for SCons itself,
but not for software built with SCons.
- Datestamps in docs and embedded in code use ISO 8601 format and UTC

From Hao Wu
- typo in customized decider example in user guide

Expand Down