crowdin: do not error on nothing to commit

This commit is contained in:
JustArchi
2018-11-06 22:17:49 +01:00
parent 527dc5613a
commit 5f7f72c65d

View File

@@ -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