From 5f7f72c65d588af49406fbd94ed826bc51a4ad93 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Tue, 6 Nov 2018 22:17:49 +0100 Subject: [PATCH] crowdin: do not error on nothing to commit --- tools/crowdin-cli/archi_core.ps1 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/crowdin-cli/archi_core.ps1 b/tools/crowdin-cli/archi_core.ps1 index 1a0640354..6302e858e 100644 --- a/tools/crowdin-cli/archi_core.ps1 +++ b/tools/crowdin-cli/archi_core.ps1 @@ -25,10 +25,14 @@ function Commit-Module($project, $path) { throw "Last command failed." } - git commit -m "Translations update" + git diff-index --quiet HEAD if ($LastExitCode -ne 0) { - throw "Last command failed." + git commit -m "Translations update" + + if ($LastExitCode -ne 0) { + throw "Last command failed." + } } } finally { Pop-Location @@ -58,10 +62,14 @@ function Crowdin-Download { throw "Last command failed." } - git commit -m "Translations update" + git diff-index --quiet HEAD if ($LastExitCode -ne 0) { - throw "Last command failed." + git commit -m "Translations update" + + if ($LastExitCode -ne 0) { + throw "Last command failed." + } } git push origin "$branch" --recurse-submodules=on-demand