fix hack/git-validation.sh script
It is impossible to have this passing because it did not run in CI and invalid commit were merged since the fixed commit. The correct way should be to always use the merge base commit instead, at least this will only check commit that are actually part of the PR not all which is wasteful. Also removed unused $PATH overwrite and $GITVALIDATE_FLAGS var. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
c90fdc85f8
commit
1c4761c67e
|
|
@ -1,13 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
export PATH=${GOPATH%%:*}/bin:${PATH}
|
|
||||||
export GIT_VALIDATION=tests/tools/build/git-validation
|
export GIT_VALIDATION=tests/tools/build/git-validation
|
||||||
if [ ! -x "$GIT_VALIDATION" ]; then
|
if [ ! -x "$GIT_VALIDATION" ]; then
|
||||||
echo git-validation is not installed.
|
echo git-validation is not installed.
|
||||||
echo Try installing it with \"make install.tools\"
|
echo Try installing it with \"make install.tools\"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if test "$TRAVIS" != true ; then
|
EPOCH_TEST_COMMIT=$(git merge-base ${DEST_BRANCH:-main} HEAD)
|
||||||
#GITVALIDATE_EPOCH=":/git-validation epoch"
|
exec "$GIT_VALIDATION" -q -run DCO,short-subject -range "${EPOCH_TEST_COMMIT}..HEAD"
|
||||||
GITVALIDATE_EPOCH="9b6484f0058d38a1b85d8b0a3e2ca83684d02e8b"
|
|
||||||
fi
|
|
||||||
exec "$GIT_VALIDATION" -q -run DCO,short-subject ${GITVALIDATE_EPOCH:+-range "${GITVALIDATE_EPOCH}""..${GITVALIDATE_TIP:-@}"} ${GITVALIDATE_FLAGS}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue