1
0

Add build version/time

This commit is contained in:
dump_stack() 2019-08-06 08:50:03 +00:00
parent 87a73b9a2b
commit 2d1044e5b8
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
3 changed files with 16 additions and 1 deletions

2
.gitignore vendored
View File

@ -27,6 +27,8 @@
*.md *.md
!README.md !README.md
translators.tex translators.tex
build-time.tex
build-ver.tex
## Generated if empty string is given at "Please type another file name for output:" ## Generated if empty string is given at "Please type another file name for output:"
.pdf .pdf

View File

@ -1,5 +1,6 @@
all: translators all: translators version time
rubber -m xelatex faif-2.0.tex rubber -m xelatex faif-2.0.tex
cp faif-2.0.pdf faif-2.0-$(shell git describe --abbrev=0 --tags).pdf
open: all open: all
xdg-open faif-2.0.pdf xdg-open faif-2.0.pdf
@ -11,3 +12,13 @@ translators:
git shortlog --summary --numbered | cut -c8- | awk 1 ORS=', ' \ git shortlog --summary --numbered | cut -c8- | awk 1 ORS=', ' \
| sed 's/, $$/./' | rev | sed 's/ ,/ и /' | rev \ | sed 's/, $$/./' | rev | sed 's/ ,/ и /' | rev \
> translators.tex > translators.tex
version:
git describe --abbrev=0 --tags | tr -d '\n' > build-ver.tex
echo -n '-' >> build-ver.tex
git rev-parse --short HEAD | tr -d '\n' >> build-ver.tex
echo -n ',' >> build-ver.tex
time:
date -I | tr -d '\n' > build-time.tex
echo -n '.' >> build-time.tex

View File

@ -31,5 +31,7 @@ ISBN: 9780983159216\\
Если вы заметили опечатки либо неточности -- отправляйте исправления по адресу Если вы заметили опечатки либо неточности -- отправляйте исправления по адресу
\href{mailto:patch@dumpstack.io}{patch@dumpstack.io}. \href{mailto:patch@dumpstack.io}{patch@dumpstack.io}.
Перевод версии \input{build-ver} сборка от \input{build-time}
\theendnotes \theendnotes
\setcounter{endnote}{0} \setcounter{endnote}{0}