Skip to content

Commit

Permalink
Update git info
Browse files Browse the repository at this point in the history
  • Loading branch information
corvus-ch committed Jan 6, 2022
1 parent 85effb3 commit ce9415a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
steps:
- name: Set up Git repository
uses: actions/checkout@v2
with:
fetch-depth: "0"

- name: Update git info
run: ./update-git-info.sh

- name: Compile inlay
uses: xu-cheng/latex-action@v2
Expand Down
2 changes: 1 addition & 1 deletion inlay.sty
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
\subject{Freitag Agenda Inlay}
\title{#1}
\author{Christian Häusler}
\date{\gitDescribe~\gitAuthorIsoDate}
\date{\gitFirstTagDescribe~\gitAuthorIsoDate}
\publishers{https://github.com/corvus-ch/freitag-inlay}
\clearpage
\maketitle
Expand Down
31 changes: 31 additions & 0 deletions update-git-info.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh
# Copyright 2015 Brent Longborough
# Part of gitinfo2 package Version 2
# Release 2.0.7 2015-11-22
# Please read gitinfo2.pdf for licencing and other details
# -----------------------------------------------------
# Post-{commit,checkout,merge} hook for the gitinfo2 package
#
# Get the first tag found in the history from the current HEAD
FIRSTTAG=$(git describe --tags --always --dirty='-*' 2>/dev/null)
# Get the first tag in history that looks like a Release
RELTAG=$(git describe --tags --long --always --dirty='-*' --match 'v*' 2>/dev/null)
# Hoover up the metadata
git --no-pager log -1 --date=short --decorate=short \
--pretty=format:"\usepackage[%
shash={%h},
lhash={%H},
authname={%an},
authemail={%ae},
authsdate={%ad},
authidate={%ai},
authudate={%at},
commname={%cn},
commemail={%ce},
commsdate={%cd},
commidate={%ci},
commudate={%ct},
refnames={%d},
firsttagdescribe={$FIRSTTAG},
reltag={$RELTAG}
]{gitexinfo}" HEAD > .git/gitHeadInfo.gin

0 comments on commit ce9415a

Please sign in to comment.