Browse Source

fix: dev: [gogocarto] don't fail if no change in last code version

If we loose the `.version` file for some reason (this should not
happen). Don't try to commit an empty commit.

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
Valentin Lab 3 years ago
parent
commit
ed582962a4
  1. 14
      gogocarto/lib/common

14
gogocarto/lib/common

@ -37,8 +37,18 @@ gogocarto:init() {
return 1
}
echo "$GOGOCARTO_RELEASE" > .version
git add -A . &&
git commit -m "Release $GOGOCARTO_RELEASE"
git add -A . || {
err "'git add -A .' in '${GOGOCARTO_CODE}' failed."
return 1
}
if git diff --staged -s --exit-code; then
info "No differences with last saved version."
else
git commit -m "Release $GOGOCARTO_RELEASE" || {
err "'git commit' failed."
return 1
}
fi
fi
}

Loading…
Cancel
Save