mirror of https://github.com/drowe67/codec2.git
Try alternate approach for getting Git branch/commit info.
parent
d7212c5ec4
commit
ecbeb0aa47
|
@ -20,10 +20,10 @@ PATH := $(PATH):$(CODEC2_BINARY)/src
|
|||
PLOT_FILES := hts2a_37_sn.tex hts2a_37_sw.tex hts2a_37_lpc_lsp.tex hts2a_37_lpc_pf.tex
|
||||
|
||||
$(DOCNAME).pdf: $(PLOT_FILES) $(DOCNAME).tex $(DOCNAME)_refs.bib
|
||||
pdflatex -file-line-error -jobname=$(JOBNAME) $(DOCNAME).tex
|
||||
pdflatex -shell-escape -file-line-error -jobname=$(JOBNAME) $(DOCNAME).tex
|
||||
bibtex $(JOBNAME).aux
|
||||
pdflatex -file-line-error -jobname=$(JOBNAME) $(DOCNAME).tex
|
||||
pdflatex -file-line-error -jobname=$(JOBNAME) $(DOCNAME).tex
|
||||
pdflatex -shell-escape -file-line-error -jobname=$(JOBNAME) $(DOCNAME).tex
|
||||
pdflatex -shell-escape -file-line-error -jobname=$(JOBNAME) $(DOCNAME).tex
|
||||
|
||||
$(PLOT_FILES):
|
||||
echo $(PATH)
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
\usepackage{catchfile}
|
||||
\usepackage{siunitx}
|
||||
|
||||
\CatchFileDef{\headfull}{../.git/HEAD}{}
|
||||
\StrGobbleRight{\headfull}{1}[\head]
|
||||
\StrBehind[2]{\head}{/}[\branch]
|
||||
\IfFileExists{../.git/refs/heads/\branch}{%
|
||||
\CatchFileDef{\commit}{../.git/refs/heads/\branch}{}}{%
|
||||
\newcommand{\commit}{\dots~(in \emph{packed-refs})}}
|
||||
\newcommand{\gitrevision}{%
|
||||
\StrLeft{\commit}{7}%
|
||||
\immediate\write18{git log -n1 --oneline | awk '{print $1;}' > gitrevision.txt}
|
||||
\input{gitrevision.txt}
|
||||
}
|
||||
|
||||
\newcommand{\branch}{%
|
||||
\immediate\write18{git branch --show-current > gitbranch.txt}
|
||||
\input{gitbranch.txt}
|
||||
}
|
||||
|
||||
\title{Codec 2}
|
||||
|
@ -53,7 +53,7 @@ pinstyle/.style = {pin edge={to-,thin,black}}
|
|||
\draw (#1,#2-0.25) -- (#1,#2+0.25);
|
||||
}
|
||||
|
||||
%\maketitle
|
||||
\maketitle
|
||||
|
||||
\section{Introduction}
|
||||
|
||||
|
|
Loading…
Reference in New Issue