Skip to content

Commit fea3ad9

Browse files
committed
Fix push target
1 parent a65e149 commit fea3ad9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,12 @@ build: setup po-install
7777
# git-added (staged); otherwise, it does nothing.
7878
# The MSG variable has a default commit message, but one can override it
7979
# e.g. make push MSG='my message'
80-
push: MSG := 'Update translations from Transifex'
80+
push: MSG := Update translations from Transifex
8181
push:
82-
@git diff -I'^"POT-Creation-Date: ' --numstat *.po **/*.po \
83-
| cut -f3 | xargs -r git add
84-
@git add $(git ls-files -o --exclude-standard *.po **/*.po) .tx/config
85-
@if [ -n "$(git diff --name-only --cached)" ]; then \
86-
git commit -m $(MSG); \
82+
@CHANGED=$(shell git diff -I'^"POT-Creation-Date: ' --numstat *.po **/*.po | cut -f3); \
83+
NEW=$(shell git ls-files -o *.po **/*.po); \
84+
if [[ "$$CHANGED$$NEW" != "" ]]; then \
85+
git commit -m '$(MSG)' $$CHANGED $$NEW .tx/config; \
8786
git push; \
8887
else \
8988
echo 'Nothing to commit'; \

0 commit comments

Comments
 (0)