Fix computation of the merge base for git-validation

CIRRUS_BASE_SHA is a valid commit, but it might not be
a parent of the current PR, so it might not be available,
making a ${CIRRUS_BASE_SHA}..$something git commit range expressions
fail.

Compare https://github.com/cirruslabs/cirrus-ci-docs/issues/1279 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač 2025-06-02 23:39:52 +02:00
parent 78f4258b2b
commit e584bbc882
1 changed files with 1 additions and 0 deletions

View File

@ -128,6 +128,7 @@ lint_task:
apt-get update
apt-get install -y libbtrfs-dev libsubid-dev
test_script: |
[ -n "${CIRRUS_BASE_SHA}" ] && git fetch origin ${CIRRUS_BASE_SHA} # Make ${CIRRUS_BASE_SHA} resolvable for git-validation
make TAGS=regex_precompile local-validate
make lint
make clean