summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2024-05-12 20:15:24 +0200
committerUlrich Müller <ulm@gentoo.org>2024-05-13 19:44:13 +0200
commitbd3a35db46006e2c45fee66e7759cfc327ebf187 (patch)
treebf0d9ecf34556ed9ecd9dcdd7fe88ac35bfc3617
parentUse sentence case throughout (diff)
downloadpms-bd3a35db46006e2c45fee66e7759cfc327ebf187.tar.gz
pms-bd3a35db46006e2c45fee66e7759cfc327ebf187.tar.bz2
pms-bd3a35db46006e2c45fee66e7759cfc327ebf187.zip
pms.cls, eapi-cheatsheet.tex: Avoid conditional code in \date
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r--eapi-cheatsheet.tex9
-rw-r--r--pms.cls13
2 files changed, 10 insertions, 12 deletions
diff --git a/eapi-cheatsheet.tex b/eapi-cheatsheet.tex
index fc75aec..2e2b757 100644
--- a/eapi-cheatsheet.tex
+++ b/eapi-cheatsheet.tex
@@ -33,11 +33,10 @@
Ulrich Müller \\
\href{mailto:ulm@gentoo.org}{ulm@gentoo.org}
}
-\date{%
- Version \version \\
- \ifthenelse{\equal{\gitCommitterDate}{(None)}}
- {Generated on: \today}
- {\printdate{\gitCommitterDate}}%
+\ifthenelse{\equal{\gitCommitterDate}{(None)}}{%
+ \date{Version \version \\ Generated on: \today}
+}{%
+ \date{Version \version \\ \printdate{\gitCommitterDate}}
}
\CutLine*{1}
\CutLine*{3}
diff --git a/pms.cls b/pms.cls
index d1a85fa..d9907b7 100644
--- a/pms.cls
+++ b/pms.cls
@@ -175,13 +175,12 @@
% Reads the last commit date from the Git repository and even succeeds
% when none is available
-\date{%
- \ifthenelse{\equal{\gitCommitterDate}{(None)}}
- {Generated on: \today}
- {\printdate{\gitCommitterDate}}%
-}
-\newcommand{\commitinfo}{%
- \ifthenelse{\equal{\gitCommitterDate}{(None)}}{}{%
+\ifthenelse{\equal{\gitCommitterDate}{(None)}}{%
+ \date{Generated on: \today}
+ \newcommand{\commitinfo}{}
+}{%
+ \date{\printdate{\gitCommitterDate}}
+ \newcommand{\commitinfo}{%
This version corresponds to commit \gitAbbrevHash
\ifthenelse{\equal{\gitBranch}{\detokenize{master}}}{}
{ on branch \gitBranch}%