Skip to content
Snippets Groups Projects
Commit 00e78cfb authored by Bernhard M. Wiedemann's avatar Bernhard M. Wiedemann
Browse files

docs/source-date-epoch: add OCaml snippet

parent 87bb32ee
No related branches found
No related tags found
No related merge requests found
Pipeline #91173 passed
......@@ -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
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment