Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 3d76d50a authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

article: Include the commit ID in the body.

* article/content.tex (Conclusion): Include "commit.tex".
* article/guix.scm (this-commit): New procedure.
(article.pdf): Use it.
parent b3aeb3d9
......@@ -419,9 +419,10 @@ similar purposes. We think that, with more experience, common build
processes and idioms could be factorized as libraries and high-level
programming constructs, making it more approachable.
It is interesting to see that a single Git commit
identifier---a \emph{content address}---is enough to refer to whole
pipeline leading to this article!
This article was built from commit \texttt{\input{commit.tex}} of
the \texttt{edcc-2006-redone} repository. It is interesting to see that
this single Git commit identifier, which can be looked up on Software
Heritage, is enough to refer to whole pipeline leading to this article!
We look forward to a future where reproducible scientific pipelines
become commonplace.
......@@ -20,7 +20,8 @@
(use-modules (guix) (gnu)
(guix graph)
((guix scripts graph) #:select (%package-node-type))
(guix git-download))
(guix git-download)
(git))
(define locales
(specification->package "glibc-utf8-locales"))
......@@ -104,6 +105,15 @@
;; Include the top-level file, which provides charts.
(include "../guix.scm")
(define (this-commit)
"Return the commit ID for the tip of this repository."
(let* ((repository (repository-open "."))
(head (repository-head repository))
(target (reference-target head))
(id (oid->string target)))
(repository-close! repository)
id))
(define article.pdf
;; Building the PDF. Adapted from the ReScience template makefile.
(let ()
......@@ -132,6 +142,11 @@
;; Likewise for the dependency graph.
(symlink #$libchop-graph.pdf "libchop-graph.pdf")
;; Store the current commit ID.
(call-with-output-file "commit.tex"
(lambda (port)
(display #$(this-commit) port)))
(invoke "latexmk" "-pdf"
"-pdflatex=xelatex -interaction=nonstopmode"
"-use-make" "article.tex")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment