Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-26 21:09:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-26 21:09:18 +0300
commit08931747cc2092734a794980ef13ff67e89a9d8b (patch)
tree0ef1c5fd1e60201b52954c1c105b800930d92c90 /scripts/lint-doc.sh
parent2eaa60e4555bb11ad5c0af905217f0fa61cf7cc9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/lint-doc.sh')
-rwxr-xr-xscripts/lint-doc.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/lint-doc.sh b/scripts/lint-doc.sh
index 9ae6ce400da..7dac15c6314 100755
--- a/scripts/lint-doc.sh
+++ b/scripts/lint-doc.sh
@@ -65,10 +65,16 @@ then
echo "Merge request pipeline (detached) detected. Testing all files."
else
MERGE_BASE=$(git merge-base ${CI_MERGE_REQUEST_TARGET_BRANCH_SHA} ${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA})
- MD_DOC_PATH=$(git diff --name-only "${MERGE_BASE}..${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}" 'doc/*.md')
- if [ -n "${MD_DOC_PATH}" ]
+ if git diff --name-only "${MERGE_BASE}..${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}" | grep -E "\.vale|\.markdownlint|lint-doc\.sh"
then
- echo -e "Merged results pipeline detected. Testing only the following files:\n${MD_DOC_PATH}"
+ MD_DOC_PATH=${MD_DOC_PATH:-doc}
+ echo "Vale, Markdownlint, or lint-doc.sh configuration changed. Testing all files."
+ else
+ MD_DOC_PATH=$(git diff --name-only "${MERGE_BASE}..${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}" 'doc/*.md')
+ if [ -n "${MD_DOC_PATH}" ]
+ then
+ echo -e "Merged results pipeline detected. Testing only the following files:\n${MD_DOC_PATH}"
+ fi
fi
fi