Page MenuHomePhabricator

Allow to override build date

Authored by bmwiedemann on Jul 13 2017, 1:23 PM.



Allow to override build date
for distribution packages that use autoreconf
to recreate the configure script

See for why this is good
for the definition of this variable.

Note: This patch will work with GNU date. If BSD date support is
important, a more complex patch needs to be done.
also shows other diffs in .edj files that still remain



Diff Detail

rEFL core/efl
No Linters Available
No Unit Test Coverage
Build Status
Buildable 4092
Build 4157: arc lint + arc unit
bmwiedemann created this revision.Jul 13 2017, 1:23 PM

We support FreeBSD, OpenBSD and OSX for efl. Not sure which variant of date they use but I fear we might need the more compex version which also supports BSD date.

@netstar could you try this patch on OpenBSD? @jayji could you try on OSX?

hi, on server;

OpenBSD 6.1 GENERIC#19 amd64
$ (git log --format=%ci -1 2>/dev/null || date -u -d@${SOURCE_DATE_EPOCH:-$(date +%s)} "+%Y-%m-%d %H:%M:%S %z") | tr -d '\n'
2017-08-02 23:24:17 +0100$

OpenBSD above seems to work, below FreeBSD, similar output.

FreeBSD Beastie 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017  amd64
$  (git log --format=%ci -1 2>/dev/null || date -u -d@${SOURCE_DATE_EPOCH:-$(date +%s)} "+%Y-%m-%d %H:%M:%S %z") | tr -d '\n'
2017-08-05 10:12:55 +0100$

@netstar thanks for the quick test!

I will give this a run here and I think we can out it in. If any further problem comes up we can re-visit this.

This revision was automatically updated to reflect the committed changes.
jayji added a comment.Aug 7 2017, 2:11 PM

Hi, seems to work fine on macOS 10.12 as well:

(git log --format=%ci -1 2>/dev/null || date -u -d@${SOURCE_DATE_EPOCH:-$(date +%s)} "+%Y-%m-%d %H:%M:%S %z") | tr -d '\n'
2017-08-07 10:42:45 -0700