Skip to content

Commit 50fc909

Browse files
committed
Add branch sync tool, align CI with local checks
1 parent 2a1c6e4 commit 50fc909

3 files changed

Lines changed: 26 additions & 5 deletions

File tree

‎.github/workflows/test-build.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- run: git pull
3636
working-directory: ./Doc/locales/de/LC_MESSAGES
3737
- uses: sphinx-doc/[email protected]
38-
- run: make -e SPHINXOPTS="--color -D language='de' -D suppress_warnings=i18n.inconsistent_references -W --keep-going" ${{ matrix.format }}
38+
- run: make -e SPHINXOPTS="--color -D language='de' -W --keep-going" ${{ matrix.format }}
3939
working-directory: ./Doc
4040
- uses: actions/upload-artifact@master
4141
if: success() || failure()

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
*.po~
33
.DS_Store
44

5+
# IDE
6+
.idea/
7+
58
# Python
69
__pycache__/
710
*.py[cod]

‎pre_push_check.sh‎

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,25 @@ if ! $NONINTERACTIVE; then
7878
fi
7979

8080
if $RUN_QUICK; then
81-
log_section "1a/4 msgfmt --check (Syntax)"
81+
log_section "1a/5 powrap (Zeilenumbruch auf 80 Zeichen)"
82+
if ! command -v powrap &>/dev/null; then
83+
echo "powrap nicht gefunden -- installiere mit: pip install powrap"
84+
else
85+
# Die CI formatiert nach jedem Push automatisch mit powrap und
86+
# committet das Ergebnis. Wer lokal nicht formatiert, bekommt beim
87+
# naechsten Rebase Konflikte in genau diesen Zeilen. Deshalb hier.
88+
vorher=$(git -C "$REPO_ROOT" diff --name-only -- '*.po' | wc -l | tr -d ' ')
89+
powrap -m 2>/dev/null
90+
nachher=$(git -C "$REPO_ROOT" diff --name-only -- '*.po' | wc -l | tr -d ' ')
91+
if [[ "$vorher" != "$nachher" ]]; then
92+
echo "powrap hat weitere Dateien umbrochen -- bitte mit committen."
93+
else
94+
echo "OK -- Umbruch war bereits sauber."
95+
fi
96+
pass=$((pass + 1))
97+
fi
98+
99+
log_section "1b/5 msgfmt --check (Syntax)"
82100
msgfmt_errors=0
83101
while IFS= read -r -d '' po; do
84102
rel="${po#"$REPO_ROOT"/}"
@@ -97,7 +115,7 @@ if $RUN_QUICK; then
97115
fail=$((fail + 1))
98116
fi
99117

100-
log_section "1b/4 sphinx-lint (Backtick-/Rollen-Syntax)"
118+
log_section "1c/5 sphinx-lint (Backtick-/Rollen-Syntax)"
101119
if ! command -v sphinx-lint &>/dev/null; then
102120
echo "sphinx-lint nicht gefunden -- installiere mit: pip install sphinx-lint"
103121
fail=$((fail + 1))
@@ -118,7 +136,7 @@ if $RUN_QUICK; then
118136
fi
119137
fi
120138

121-
log_section "1c/4 Rollen-Konsistenz (eigener Check, kein Build noetig)"
139+
log_section "1d/5 Rollen-Konsistenz (eigener Check, kein Build noetig)"
122140
if [[ ! -f "$CHECK_ROLES_PY" ]]; then
123141
echo "check_roles.py nicht gefunden unter $CHECK_ROLES_PY -- Schritt uebersprungen."
124142
else
@@ -129,7 +147,7 @@ if $RUN_QUICK; then
129147
fi
130148
fi
131149

132-
log_section "1d/4 Auszeichnung (ueberfluessige Backticks, Codebloecke, Literale)"
150+
log_section "1e/5 Auszeichnung (ueberfluessige Backticks, Codebloecke, Literale)"
133151
if [[ ! -f "$CHECK_MARKUP_PY" ]]; then
134152
echo "check_markup.py nicht gefunden unter $CHECK_MARKUP_PY -- Schritt uebersprungen."
135153
else

0 commit comments

Comments
 (0)