Skip to content

Commit

Permalink
Try to output the diff if lni.dtx is not adapted (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor authored Jul 12, 2023
1 parent c38b4c3 commit ba1990f
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 8 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/basic-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: check lni-paper-example-de

on:
push:
branches:
- main
pull_request:
schedule:
- cron: '1 2 5 * *'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
container:
image: reitzig/texlive-base:2023.1
options: --user root
env:
SRC_DIR: /__w/LNI/LNI

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Add x86_64-linuxmusl to PATH
run: echo "/usr/local/texlive/2023/bin/x86_64-linuxmusl" >> $GITHUB_PATH

- name: pdflatex lni-paper-example-de
run: /bin/entrypoint work pdflatex lni-paper-example-de

- name: biber lni-paper-example-de
run: /bin/entrypoint work biber lni-paper-example-de

- name: pdflatex lni-paper-example-de
run: /bin/entrypoint work pdflatex lni-paper-example-de

- name: pdflatex lni-paper-example-de
run: /bin/entrypoint work pdflatex lni-paper-example-de

- name: Upload build result
uses: actions/upload-artifact@v3
with:
name: PDFs
path: '/work/out'
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: check
on:
push:
branches:
-main
- main
pull_request:
schedule:
- cron: '1 2 5 * *'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ lni-paper-example-de.pdf

mybibfile.bib

*.old

*.hd

## Core latex/pdflatex auxiliary files:
Expand Down
17 changes: 15 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
set -e
printf "\n\033[32mCompiling lni-paper-example-de using lni.cls\n\n\033[37m"
pdflatex lni-paper-example-de

cp lni.cls lni.old
cp lni-paper-example-de.tex lni-paper-example-de.old

printf "\nGenerating lni.cls, *.tex...\n\n"
pdflatex lni.dtx
pdflatex lni.dtx
pdflatex lni.dtx

FILES=("lni.cls" "lni.old" "lni-paper-example-de.tex" "lni-paper-example-de.old")
for (( i=0; i<${#FILES[@]}; i+=2 )); do
DIFF=$(diff -w "${FILES[i]}" "${FILES[i+1]}")
if [ "$DIFF" != "" ]; then
printf "\033[31mFiles ${FILES[i]} and ${FILES[i+1]} differ:\033[37m\n"
echo "$DIFF"
printf "\033[31mPlease adapt lni.dtx to include these changes\033[37m\n"
printf "\nSee https://github.com/gi-ev/LNI/issues/108 for more background information\n"
exit 99
fi
done

printf "\n\033[32mCompiling lni-author-template...\n\n\033[37m"
touch mybibfile.bib
pdflatex lni-author-template
Expand Down
10 changes: 5 additions & 5 deletions lni.cls
Original file line number Diff line number Diff line change
Expand Up @@ -657,19 +657,19 @@
\brokenpenalty=2000
\vfuzz \hfuzz
\raggedbottom
%%
%%
%% Copyright (C) 2016-2023 by Gesellschaft für Informatik e.V. (GI)
%%
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License (LPPL), either
%% version 1.3c of this license or (at your option) any later
%% version. The latest version of this license is in the file:
%%
%%
%% http://www.latex-project.org/lppl.txt
%%
%%
%% This work is "maintained" (as per LPPL maintenance status) by
%% Martin Sievers.
%%
%%
%% This work consists of the file lni.dtx
%% lni.ins
%% README.md
Expand Down

0 comments on commit ba1990f

Please sign in to comment.