From cdd5ce9264716731d24a36ab08cc1fe7bf1ae43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Fri, 18 Jan 2019 19:00:39 +0100 Subject: [PATCH] Only publish HTML man pages if the tag is cut off master [ci skip] --- script/publish-release | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/publish-release b/script/publish-release index 2ba1deec..c9b958b1 100755 --- a/script/publish-release +++ b/script/publish-release @@ -31,11 +31,16 @@ publish_documentation() { popd } +in_default_branch() { + git fetch origin master --depth 10 + git merge-base --is-ancestor "$1" FETCH_HEAD +} + if [[ $TRAVIS_TAG == v* ]] && [ "$TRAVIS_OS_NAME" = "linux" ] && latest_go_version && [ -n "$GITHUB_OAUTH" ]; then version="${TRAVIS_TAG#v}" make man-pages script/cross-compile "$version" | \ PATH="bin:$PATH" script/github-release hub "$version" - publish_documentation + in_default_branch "$TRAVIS_TAG" && publish_documentation || echo "skipping publishing documentation" fi