Only trigger build for master / pr = false and set matrix to master

This commit is contained in:
Daniel Kesselberg 2018-08-24 17:08:00 +02:00
parent 7f8290ae33
commit 422e6a6d9e

View File

@ -6,10 +6,16 @@ set -ev
# change to build directory
cd ${TRAVIS_BUILD_DIR}
curl -X POST \
https://api.travis-ci.org/repo/humhub%2Fhumhub-modules-calendar/requests \
-H 'Accept: application/json' \
-H 'Authorization: token '${AUTH_TOKEN} \
-H 'Content-Type: application/json' \
-H 'Travis-API-Version: 3' \
-d '{"request": {"branch": "master"}}'
# build only when branch master and no pull request
if [ ${TRAVIS_BRANCH} = "master" ] && [ ${TRAVIS_PULL_REQUEST} = "false" ]; then
# trigger build for calendar
curl -X POST \
https://api.travis-ci.org/repo/humhub%2Fhumhub-modules-calendar/requests \
-H 'Accept: application/json' \
-H 'Authorization: token '${AUTH_TOKEN} \
-H 'Content-Type: application/json' \
-H 'Travis-API-Version: 3' \
-d '{"request":{"branch":"master","config":{"env":{"matrix":["HUMHUB_VERSION=master"]}}}}'
fi