asciidoc-py / asciidoc-py2

Deprecated python2 implementation of AsciiDoc.py. See asciidoc-py/asciidoc-py for current work.
https://asciidoc.org/
GNU General Public License v2.0
466 stars 128 forks source link

Respect SOURCE_DATE_EPOCH #106

Closed andersk closed 7 years ago

andersk commented 7 years ago

If the SOURCE_DATE_EPOCH environment variable is set, then (1) use UTC for all timestamps and (2) replace all timestamps with min(timestamp, SOURCE_DATE_EPOCH). This allows projects using AsciiDoc to build reproducibly without being patched to pass extra flags.

(We don’t expose UTC timestamps as a separate command line option as in #70, but that shouldn’t be necessary because a user who knows they want UTC can run env TZ=UTC asciidoc. The goal here is to enable reproducibility without requiring special consideration by all AsciiDoc users.)

elextr commented 7 years ago

Please document in the user guide the change in semantics of the four attributes and add an environment variables section to the man page.

andersk commented 7 years ago

Documented.

lamby commented 7 years ago

Any update on this? :)

elextr commented 7 years ago

@lamby thanks for pinging.

Has anybody (other than the OP) tested it? Also I noticed something on reviewing that I have questioned.

lamby commented 7 years ago

@elextr Thanks for the update on this.

has anybody (other than the OP) tested it?

I've just tested it this PR on a few packages and it appears to work great.

elextr commented 7 years ago

Appears to match what Asciidoctor does so committed.

lamby commented 7 years ago

Many thanks :)