From b789199f107912cfce5e4a95d6152f9a1a7993f2 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 26 Dec 2015 06:35:08 +0400 Subject: [PATCH] [travis] Build docs only on tagged revisions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lets see if it works… --- .ci/deploy-docs.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/deploy-docs.sh b/.ci/deploy-docs.sh index bbd64dfa6..3323061e4 100755 --- a/.ci/deploy-docs.sh +++ b/.ci/deploy-docs.sh @@ -1,6 +1,8 @@ +TAG="$(git describe --exact-match --match "[0-9]*" HEAD 2>/dev/null)" + set -o errexit -o nounset -if [ "$TRAVIS_OS_NAME" == "linux" -a "$CC" == "gcc" -a "$TRAVIS_SECURE_ENV_VARS" == "true" -a "$TRAVIS_PULL_REQUEST" == "false" -a "$TRAVIS_BRANCH" == "master" ] +if [ "$TRAVIS_OS_NAME" == "linux" -a "$CC" == "gcc" -a "$TRAVIS_SECURE_ENV_VARS" == "true" -a "$TAG" != ""] then DOCSDIR=build-docs REVISION=$(git rev-parse --short HEAD)