From 5d2d491258932f99563d7647f25976437bc903d2 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Tue, 6 Aug 2019 08:50:03 +0000 Subject: [PATCH] Add build version/time --- .gitignore | 2 ++ Makefile | 13 ++++++++++++- copyright.tex | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c9407dd..0a8f566 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,8 @@ *.md !README.md translators.tex +build-time.tex +build-ver.tex ## Generated if empty string is given at "Please type another file name for output:" .pdf diff --git a/Makefile b/Makefile index 316d4f1..dc126ce 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ -all: translators +all: translators version time rubber -m xelatex faif-2.0.tex + cp faif-2.0.pdf faif-2.0-$(shell git describe --abbrev=0 --tags).pdf open: all xdg-open faif-2.0.pdf @@ -11,3 +12,13 @@ translators: git shortlog --summary --numbered | cut -c8- | awk 1 ORS=', ' \ | sed 's/, $$/./' | rev | sed 's/ ,/ и /' | rev \ > 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 diff --git a/copyright.tex b/copyright.tex index e6af954..d3957ea 100644 --- a/copyright.tex +++ b/copyright.tex @@ -31,5 +31,7 @@ ISBN: 9780983159216\\ Если вы заметили опечатки либо неточности -- отправляйте исправления по адресу \href{mailto:patch@dumpstack.io}{patch@dumpstack.io}. +Перевод версии \input{build-ver} сборка от \input{build-time} + \theendnotes \setcounter{endnote}{0}