Only publish HTML man pages if the tag is cut off master

[ci skip]
This commit is contained in:
Mislav Marohnić 2019-01-18 19:00:39 +01:00
Родитель ddf0d82510
Коммит cdd5ce9264
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -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