Skip to content

Commit

Permalink
include git revision hash and date
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtich committed May 23, 2012
1 parent e9f5f96 commit 4121ef7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
13 changes: 10 additions & 3 deletions 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


7 changes: 4 additions & 3 deletions paia.md
@@ -1,7 +1,6 @@
% Patrons Account Information API (PAIA)
% Jakob Voß
% 2012-05-22

% GIT_REVISION_DATE

# Introduction

Expand All @@ -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
Expand Down
File renamed without changes.

0 comments on commit 4121ef7

Please sign in to comment.