diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-26 21:09:18 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-26 21:09:18 +0300 |
commit | 08931747cc2092734a794980ef13ff67e89a9d8b (patch) | |
tree | 0ef1c5fd1e60201b52954c1c105b800930d92c90 /scripts | |
parent | 2eaa60e4555bb11ad5c0af905217f0fa61cf7cc9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/lint-doc.sh | 12 | ||||
-rwxr-xr-x | scripts/used-feature-flags | 2 |
2 files changed, 11 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 diff --git a/scripts/used-feature-flags b/scripts/used-feature-flags index 07b8d2063ef..6fc3a2f7d10 100755 --- a/scripts/used-feature-flags +++ b/scripts/used-feature-flags @@ -1,5 +1,7 @@ #!/usr/bin/env ruby +require 'set' + class String def red "\e[31m#{self}\e[0m" |