integrate git version
This commit is contained in:
parent
68dc3839e4
commit
ad23834556
3 changed files with 47 additions and 2 deletions
31
.ci/git-info-2.sh
Executable file
31
.ci/git-info-2.sh
Executable file
|
@ -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 '[0-9]*.*' 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
|
|
@ -1,4 +1,4 @@
|
||||||
\documentclass[10pt,ngerman,a4paper]{mkessler-script}
|
\documentclass[10pt,ngerman,a4paper, fancyfoot, git]{mkessler-script}
|
||||||
|
|
||||||
\course{Systemnahe Programmierung}
|
\course{Systemnahe Programmierung}
|
||||||
\lecturer{Dr. Matthias Frank, Dr. Matthias Wübbeling}
|
\lecturer{Dr. Matthias Frank, Dr. Matthias Wübbeling}
|
||||||
|
|
16
Makefile
16
Makefile
|
@ -1,4 +1,4 @@
|
||||||
pdf: .init-submodule-cert
|
pdf: init
|
||||||
latexmk
|
latexmk
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -7,9 +7,23 @@ clean:
|
||||||
clean-all:
|
clean-all:
|
||||||
latexmk -C
|
latexmk -C
|
||||||
|
|
||||||
|
## Stuff to set up repository after cloning
|
||||||
|
|
||||||
|
init: .init-submodule-cert .init-git-hooks-cert
|
||||||
|
|
||||||
.init-submodule-cert:
|
.init-submodule-cert:
|
||||||
@echo "[Make] Initialising git submodule for packages"
|
@echo "[Make] Initialising git submodule for packages"
|
||||||
git submodule update --init --rebase
|
git submodule update --init --rebase
|
||||||
@touch .init-submodule-cert
|
@touch .init-submodule-cert
|
||||||
|
|
||||||
|
# Sets up git hooks for gitinfo2 package
|
||||||
|
.init-git-hooks-cert:
|
||||||
|
@echo "[Make] Setting up git hooks for package gitinfo2"
|
||||||
|
@mkdir -p .git/hooks
|
||||||
|
@cp .ci/git-info-2.sh .git/hooks/post-merge
|
||||||
|
@cp .ci/git-info-2.sh .git/hooks/post-checkout
|
||||||
|
@cp .ci/git-info-2.sh .git/hooks/post-commit
|
||||||
|
@.ci/git-info-2.sh
|
||||||
|
|
||||||
|
|
||||||
.PHONY: pdf, clean, clean-all
|
.PHONY: pdf, clean, clean-all
|
||||||
|
|
Loading…
Reference in a new issue