ci: don't push on master, only tags

This commit is contained in:
Sandro Jäckel 2020-05-18 03:07:19 +02:00
parent a2849b016a
commit afd636fc3f
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -60,11 +60,9 @@ if [[ ${TRAVIS_BRANCH:-} ]]; then
fi
# only push when:
# latest changes where made in the folder corresponding to the version we build, we are on master and don't build a PR.
if [[ $(dirname "$(git diff --name-only HEAD^)") =~ $VERSION_SHORT ]] && [[ ${TRAVIS_BRANCH:-} == master ]] && [[ $TRAVIS_PULL_REQUEST_BRANCH == "" ]] ||
# we build a tag and we are not on master
[[ $VERSION == "${TRAVIS_BRANCH_VERSION:-}" ]] && [[ ${TRAVIS_PULL_REQUEST_BRANCH:-} == "" ]] ||
# we are not in CI
# or we build a tag and we don't build a PR
if [[ $VERSION == "${TRAVIS_BRANCH_VERSION:-}" ]] && [[ ${TRAVIS_PULL_REQUEST_BRANCH:-} == "" ]] ||
# or we are not in CI
[[ -z ${CI:-} ]]; then
if [[ ${CI:-} == true ]]; then