Skip to content

Commit 38813b2

Browse files
committed
Add extra files only on relevante PO changes
1 parent e118655 commit 38813b2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/commit.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ set -eu
77

88
cd $(dirname $0)/../cpython/Doc/locale/${PYDOC_LANGUAGE}/LC_MESSAGES
99

10+
extra_files=".tx/config stats.json potodo.md"
11+
1012
set +u
1113
if [ -n "${CI+x}" ]; then
1214
git config user.email "github-actions[bot]@users.noreply.github.com"
@@ -21,7 +23,7 @@ git status -s | grep '^ D ' | cut -d' ' -f3 | xargs -r git rm -v
2123
git diff -I'^"POT-Creation-Date: ' --numstat *.po **/*.po | cut -f3 | xargs -r git add -v
2224

2325
# Add currently untracked PO files, and update other helper files
24-
git add -v $(git ls-files -o --exclude-standard *.po **/*.po) .tx/config stats.json potodo.md
26+
git add -v $(git ls-files -o --exclude-standard *.po **/*.po)
2527

2628
# Commit only if there is any cached file
27-
git diff-index --cached --quiet HEAD || git commit -vm "Update translations"
29+
git diff-index --cached --quiet HEAD || { git add -v $extra_files; git commit -vm "Update translations"; }

0 commit comments

Comments
 (0)