[Git][reproducible-builds/reproducible-website][master] docs/source-date-epoch: add OCaml snippet
Bernhard M. Wiedemann
gitlab at salsa.debian.org
Fri Dec 6 06:54:06 UTC 2019
Bernhard M. Wiedemann pushed to branch master at Reproducible Builds / reproducible-website
Commits:
00e78cfb by Bernhard M. Wiedemann at 2019-12-06T06:52:05Z
docs/source-date-epoch: add OCaml snippet
- - - - -
1 changed file:
- _docs/source-date-epoch.md
Changes:
=====================================
_docs/source-date-epoch.md
=====================================
@@ -282,6 +282,16 @@ SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
(getenv "SOURCE_DATE_EPOCH"))))))
```
+### OCaml
+
+```
+let build_date =
+ try
+ float_of_string (Sys.getenv "SOURCE_DATE_EPOCH")
+ with
+ Not_found -> Unix.time ()
+```
+
### Javascript / node.js
```
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/commit/00e78cfb4df84c558ed9338d38fbfc2dd63e01f2
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/commit/00e78cfb4df84c558ed9338d38fbfc2dd63e01f2
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20191206/cf67a554/attachment.htm>
More information about the rb-commits
mailing list