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 fi
# only push when: # 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. # or we build a tag and we don't build a PR
if [[ $(dirname "$(git diff --name-only HEAD^)") =~ $VERSION_SHORT ]] && [[ ${TRAVIS_BRANCH:-} == master ]] && [[ $TRAVIS_PULL_REQUEST_BRANCH == "" ]] || if [[ $VERSION == "${TRAVIS_BRANCH_VERSION:-}" ]] && [[ ${TRAVIS_PULL_REQUEST_BRANCH:-} == "" ]] ||
# we build a tag and we are not on master # or we are not in CI
[[ $VERSION == "${TRAVIS_BRANCH_VERSION:-}" ]] && [[ ${TRAVIS_PULL_REQUEST_BRANCH:-} == "" ]] ||
# we are not in CI
[[ -z ${CI:-} ]]; then [[ -z ${CI:-} ]]; then
if [[ ${CI:-} == true ]]; then if [[ ${CI:-} == true ]]; then