[Buildkite] Fix CI docs bypass by ensuring HEAD diff for master is correct (#699)
parent
7a0d217b67
commit
6af27cb3f9
|
@ -1,9 +1,15 @@
|
|||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
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
|
||||
|
||||
cat << EOF
|
||||
env:
|
||||
CI_DOCS_BYPASS: $(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
|
||||
CI_DOCS_BYPASS: ${CI_DOCS_BYPASS}
|
||||
|
||||
steps:
|
||||
- label: ":docker: Image Deployments"
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
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
|
||||
|
||||
cat << EOF
|
||||
env:
|
||||
CI_DOCS_BYPASS: $(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
|
||||
CI_DOCS_BYPASS: ${CI_DOCS_BYPASS}
|
||||
|
||||
steps:
|
||||
- label: ":hammer_and_wrench: Unit Test"
|
||||
|
|
Loading…
Reference in New Issue