Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

include git revision hash and date

  • Loading branch information...
commit 4121ef7b3e4f6389fb05597fc159d9929ba84471 1 parent e9f5f96
@nichtich nichtich authored
View
13 Makefile
@@ -1,3 +1,10 @@
-paia.html: paia.md template.html references.bib
- pandoc -N --bibliography=references.bib --template=template --toc -5 -o paia.html paia.md
- perl -p -i -e 's!(http://[^<]+)\.</p>!<a href="$$1"><code class="url">$$1</code></a>.</p>!g' paia.html
+REVHASH=$(shell git log -1 --format="%H" paia.md)
+REVDATE=$(shell git log -1 --format="%ad" --date=short paia.md)
+
+paia.html: paia.md template.html5 references.bib
+ sed s/GIT_REVISION_DATE/${REVDATE}/ paia.md \
+ | pandoc -N --bibliography=references.bib --template=template --toc -f markdown -t html5 -- \
+ | perl -p -e 's!(http://[^<]+)\.</p>!<a href="$$1"><code class="url">$$1</code></a>.</p>!g' \
+ | sed 's!GIT_REVISION_HASH!<a href="https://github.com/gbv/paia/commit/${REVHASH}">${REVHASH}<\/a>!' > paia.html
+
+
View
7 paia.md
@@ -1,7 +1,6 @@
% Patrons Account Information API (PAIA)
% Jakob Voß
-% 2012-05-22
-
+% GIT_REVISION_DATE
# Introduction
@@ -20,7 +19,9 @@ based on use cases and taking into account existing related standards and
products such as NISO Circulation Interchange Protocol (NCIP), \[X]SLNP,
DLF-ILS recommendations, and ViFind ILS drivers.
-Updates and sources can be found at <http://github.com/gbv/paia>.
+Updates and sources can be found at <http://github.com/gbv/paia>. The current
+version of this document was last modified at GIT_REVISION_DATE with revision
+GIT_REVISION_HASH.
## Conformance requirements
View
0  template.html → template.html5
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.