Skip to content

Commit

Permalink
fix tagging script, tag 2.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Rdeisenroth committed Aug 20, 2024
1 parent f24a3e8 commit 3e63f6f
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 17 deletions.
25 changes: 23 additions & 2 deletions build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ typesetopts = "-interaction=nonstopmode --shell-escape -halt-on-error"
packtdszip = true -- recommended for "tree" layouts

-- Tagging
tagfiles = {"tex/*.sty", "tex/*.cls"}
tagfiles = {"tex/*.sty", "tex/*.cls", "doc/*.tex"}
function tag_hook(tagname)
-- os.execute('git commit -a -m "Step release tag"')
-- os.execute('git tag -a -m "" ' .. tagname)
Expand All @@ -29,8 +29,18 @@ end
function update_tag(file, content, tagname, tagdate)
tagname = string.gsub(tagname, "^v", "")
if string.match(file, ".*%.sty") or string.match(file, ".*%.cls") then
-- \ProvidesExplPackage{<name>}{<date>}{<version>}{<description>}
-- \def\fileversion{<name>}
temp = string.gsub(content,
"\\def\\fileversion%{([^}]*)%}",
"\\def\\fileversion{" .. tagname .. "}"
)
-- \def\filedate{<date>}
temp = string.gsub(temp,
"\\def\\filedate%{([^}]*)%}",
"\\def\\filedate{" .. tagdate .. "}"
)
-- \ProvidesExplPackage{<name>}{<date>}{<version>}{<description>}
temp = string.gsub(temp,
"\\ProvidesExplPackage%{([^}]*)%}%{([^}]*)%}%{([^}]*)%}%{([^}]*)%}",
"\\ProvidesExplPackage{%1}{" .. tagdate .. "}{" .. tagname .. "}{%4}"
)
Expand All @@ -44,6 +54,17 @@ function update_tag(file, content, tagname, tagdate)
"\\ProvidesExplClass%{([^}]*)%}%{([^}]*)%}%{([^}]*)%}%{([^}]*)%}",
"\\ProvidesExplClass{%1}{" .. tagdate .. "}{" .. tagname .. "}{%4}"
)
elseif string.match(file, ".*%.tex") then
-- \version{<name>} %%<!-- version -->%%
temp = string.gsub(content,
"\\version%{([^}]*)%} %%%%<!%-%- version %-%->%%%%",
"\\version{" .. tagname .. "} %%%%<!-- version -->%%%%"
)
-- \date{<date>} %%<!-- date -->%%
return string.gsub(temp,
"\\date%{([^}]*)%} %%%%<!%-%- date %-%->%%%%",
"\\date{" .. tagdate .. "} %%%%<!-- date -->%%%%"
)
end
return content
end
9 changes: 2 additions & 7 deletions doc/algoexercise_manual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,13 @@
%%--Dokumenteneinstellungen--%%
%%---------------------------%%

\date{\today}
\date{2024-08-20} %%<!-- date -->%%
\author{Ruben Deisenroth}
\subtitle{Rückfragen zu diesem Handbuch vorzugsweise in Discord an Rubosplay\#0815!}
\dozent{Prof. Dr. rer. nat. Karsten Weihe} % chktex 12
\fachbereich{Informatik}
\semester{SoSe 2022}
\sheetnumber{1}
% \slides{<1>}
\supervisor{\mbox{ }}
\topics{Funktionalitäten der Vorlage, \LaTeX-Konventionen für das Erstellen v. Übungsblättern}
\title[Handbuch]{Handbuch zur algoexercise-Klasse}
\version{2.2.3}
\version{2.2.8} %%<!-- version -->%%
\graphicspath{{./pictures/}}

%%-------------------------%%
Expand Down
2 changes: 1 addition & 1 deletion tex/FOPBot.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\RequirePackage{tudacolors}
\ProvidesExplPackage{FOPBot}{2024-05-13}{1.0.1-Snapshot}{FOP-Bot LaTeX Package}
\ProvidesExplPackage{FOPBot}{2024-08-20}{2.2.8}{FOP-Bot LaTeX Package}

% Made by Ruben Deisenroth, created in 2020
% Available at https://github.com/Rdeisenroth/FOPBot-Latex-Package
Expand Down
2 changes: 1 addition & 1 deletion tex/algo-common.sty
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\ProvidesExplPackage{algo-common}{2024-05-13}{1.0.1-Snapshot}{Common Definitions for all Algo templates - Based on rubos-common (https://github.com/Rdeisenroth/Rubos-TUDA-Template/blob/main/tex/rubos-common.sty)}
\ProvidesExplPackage{algo-common}{2024-08-20}{2.2.8}{Common Definitions for all Algo templates - Based on rubos-common (https://github.com/Rdeisenroth/Rubos-TUDA-Template/blob/main/tex/rubos-common.sty)}
% Package Made by Ruben Deisenroth, 2022
% Available at https://github.com/Rdeisenroth/Rubos-TUDA-Template/blob/main/tex/rubos-common.sty

Expand Down
2 changes: 1 addition & 1 deletion tex/algo-snippets.sty
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\ProvidesExplPackage{algo-snippets}{2024-05-13}{1.0.1-Snapshot}{Snippets that are Commonly used in Algo}
\ProvidesExplPackage{algo-snippets}{2024-08-20}{2.2.8}{Snippets that are Commonly used in Algo}
% Package Made by Ruben Deisenroth, 2022

\RequirePackage{l3keys2e}
Expand Down
4 changes: 2 additions & 2 deletions tex/algoexercise.cls
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
% FOP and AuD Exercise template class
% Author: Ruben Deisenroth
\def\fileversion{2.2.7}
\def\filedate{2022/08/27}
\def\fileversion{2.2.8}
\def\filedate{2024-08-20}

% Sets the LaTeX version for the package to work.
\NeedsTeXFormat{LaTeX2e}
Expand Down
4 changes: 2 additions & 2 deletions tex/algoslides.cls
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\def\fileversion{1.3.6}
\def\filedate{2022/03/10}
\def\fileversion{2.2.8}
\def\filedate{2024-08-20}

% Sets the LaTeX version for the package to work.
\NeedsTeXFormat{LaTeX2e}
Expand Down
2 changes: 1 addition & 1 deletion tex/audutils.sty
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{audutils}[2024-05-13 Algorithms and Data structures LaTeX Package]
\ProvidesPackage{audutils}[2024-08-20 Algorithms and Data structures LaTeX Package]

% Made by Ruben Deisenroth, 2021
% Available at https://github.com/Rdeisenroth/AuD-Zusammenfassung/blob/master/audutils.sty
Expand Down

0 comments on commit 3e63f6f

Please sign in to comment.