Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reproducible-website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reproducible Builds
reproducible-website
Commits
00e78cfb
There was an error fetching the commit references. Please try again later.
Commit
00e78cfb
authored
5 years ago
by
Bernhard M. Wiedemann
Browse files
Options
Downloads
Patches
Plain Diff
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
5 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
_docs/source-date-epoch.md
+10
-0
10 additions, 0 deletions
_docs/source-date-epoch.md
with
10 additions
and
0 deletions
_docs/source-date-epoch.md
+
10
−
0
View file @
00e78cfb
...
...
@@ -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
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment