From 6305e84d91becdc15494e0aaa511d5b79ccfc01b Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Sat, 6 Mar 2021 00:33:47 +0100 Subject: [PATCH] feat(#217): Translations: git add only if modified files are present --- tools/import-translations-github.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/import-translations-github.sh b/tools/import-translations-github.sh index abbafdf1..0f78dc23 100644 --- a/tools/import-translations-github.sh +++ b/tools/import-translations-github.sh @@ -70,12 +70,13 @@ if [ "$CIRCLE_PULL_REQUEST" == "" ]; then # git add . # git remote rm origin # git remote add origin https://rm3l:$GITHUB_API_KEY@github.com/rm3l/maoni.git - git add . - git commit -m "Automatic translation import (build #$CIRCLE_BUILD_NUM)." \ - -m "Commit $CIRCLE_SHA1" - git pull --rebase - #git push origin master 2>&1 - git status --porcelain + + [[ -z $(git status --porcelain) ]] || \ + git add . && \ + git commit -m "Automatic translation import (build #$CIRCLE_BUILD_NUM)." \ + -m "Commit $CIRCLE_SHA1" && \ + git pull --rebase && \ + #git push origin master 2>&1 echo -e "... Done with importing translations from Crowdin\n" fi