wrap bump_script in function, so we can cleanly return
@@ -5,6 +5,7 @@ cd "$( dirname "${BASH_SOURCE[0]}" )"/..
set -e
# Validate if the open-api schema needs to be bumped
+function main() {
if [ "$TRAVIS_BRANCH" = "develop" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
# PREVIOUSSEMVER = comparison of the current HEAD of WEAVIATESCHEMAFILE with the previous commit. More info: https://github.com/fsaintjacques/semver-tool/blob/master/README.md
PREVIOUSSEMVER=$(./semver compare $(git show --oneline HEAD:$WEAVIATESCHEMAFILE | jq -r ".info.version") $(git show --oneline HEAD~1:$WEAVIATESCHEMAFILE | jq -r ".info.version"))
@@ -27,3 +28,6 @@ if [ "$TRAVIS_BRANCH" = "develop" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; the
return 1
fi
fi
+}
+
+main "$@"
