Skip to content
Snippets Groups Projects
Unverified Commit 7b8494d2 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

ci: update lint-commit-msg.sh script

parent 33d01b8d
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,17 @@
# see https://github.com/conventional-changelog/commitlint/issues/885
if [ "${CI_COMMIT_BEFORE_SHA}" = "0000000000000000000000000000000000000000" ]
if [ "${CI_COMMIT_BEFORE_SHA}" = "0000000000000000000000000000000000000000" ];
then
echo "commitlint from HEAD^"
npx commitlint --from=HEAD^
else
echo "commitlint from ${CI_COMMIT_BEFORE_SHA}"
npx commitlint --from="${CI_COMMIT_BEFORE_SHA}"
br=`git branch -r --contains ${CI_COMMIT_BEFORE_SHA}`
if [ ! -n $br ];
then
npx commitlint --from=HEAD^
else
npx commitlint --from="${CI_COMMIT_BEFORE_SHA}"
fi
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment