public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Include Git Hash in PDF
@ 2022-01-20 14:45 'Jan Ulrich Hasecke' via pandoc-discuss
       [not found] ` <98ea588d-45d4-1d50-5d30-c7d676728c23-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: 'Jan Ulrich Hasecke' via pandoc-discuss @ 2022-01-20 14:45 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hi all,

I am lost.

How can I insert the commit hash from git in the output file?

I tried to evaluate "git rev-parse HEAD" in a build script and hand over 
the result to the build process by setting a custom variable to the hash 
string via --variable hash=${git rev-parse HEAD}. In my template I have 
$hash$

I stored the hash in a file and tried to include it with -B, though this 
would not be a good solution if it worked at all.

I guess this is quite a common requirement but I failed to find the 
solution with Google & Co.

Any hints
juh


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-20 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-20 14:45 Include Git Hash in PDF 'Jan Ulrich Hasecke' via pandoc-discuss
     [not found] ` <98ea588d-45d4-1d50-5d30-c7d676728c23-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2022-01-20 15:20   ` 'Saku Laesvuori' via pandoc-discuss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).