[Buildkite] Fix docs bypass for tagged releases (#709)

This commit is contained in:
Amir Zarrinkafsh 2020-03-15 21:07:23 +11:00 committed by GitHub
parent c575fda619
commit a24ca937cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 10 deletions

View File

@ -1,11 +1,13 @@
#!/bin/bash
set -u
if [[ $BUILDKITE_TAG == "" ]]; then
if [[ $BUILDKITE_BRANCH == "master" ]]; then
CI_DOCS_BYPASS=$(git diff --name-only HEAD~1 | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
else
CI_DOCS_BYPASS=$(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
fi
fi
cat << EOF
env:

View File

@ -1,6 +1,7 @@
#!/bin/bash
set -u
if [[ $BUILDKITE_TAG == "" ]]; then
if [[ $BUILDKITE_BRANCH == "master" ]]; then
CI_DOCS_BYPASS=$(git diff --name-only HEAD~1 | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
else
@ -10,6 +11,7 @@ fi
if [[ $CI_DOCS_BYPASS == "true" ]]; then
cat .buildkite/annotations/documentation | buildkite-agent annotate --style "info" --context "ctx-info"
fi
fi
cat << EOF
env: