1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00

put back grep changes, they are causing build failures

test
This commit is contained in:
aireilly
2023-12-04 08:36:05 +00:00
parent 8d6994fb1c
commit ee2f61e084
2 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ check_updated_assemblies () {
if [ "${MODULES}" ]
then
# $UPDATED_ASSEMBLIES is the list of assemblies that contains changed modules
UPDATED_ASSEMBLIES=$(grep -rnwl "$REPO_PATH" --exclude-dir={snippets,modules} -e "$MODULES" -- "*.adoc")
UPDATED_ASSEMBLIES=$(grep -rnwl "$REPO_PATH" --include=\*.adoc --exclude-dir={snippets,modules} -e "$MODULES")
# Exit 0 if there are no modified assemblies
if [[ -z "${UPDATED_ASSEMBLIES}" ]]
then
@@ -38,7 +38,7 @@ check_updated_assemblies () {
# search for files only, not folders
PAGE="File: $(basename "$ASSEMBLY" .adoc)"
# don't validate the assembly if it is not in a topic map
if grep -rq "$PAGE" _topic_maps/*.yml; then
if grep -rq "$PAGE" --include "*.yml" _topic_maps ; then
# validate the assembly
echo "Validating $ASSEMBLY ... 🚨"
RED='\033[0;31m'

View File

@@ -15,7 +15,7 @@ MODULES=$(echo "$FILES" | awk '/modules\/(.*)\.adoc/')
if [ "${MODULES}" ]
then
# $UPDATED_ASSEMBLIES is the list of assemblies that contains changed modules
UPDATED_ASSEMBLIES=$(grep -rnwl "$REPO_PATH" --exclude-dir={snippets,modules} -e "$MODULES" -- "*.adoc")
UPDATED_ASSEMBLIES=$(grep -rnwl "$REPO_PATH" --include=\*.adoc --exclude-dir={snippets,modules} -e "$MODULES")
# Exit 0 if there are no modified assemblies
if [[ -z "${UPDATED_ASSEMBLIES}" ]]
@@ -36,7 +36,7 @@ for ASSEMBLY in $ALL_ASSEMBLIES; do
# Search for files only, not folders
PAGE="File: $(basename "$ASSEMBLY" .adoc)"
# Don't include the assembly if it is not in a topic map
if grep -rq "$PAGE" _topic_maps/*.yml; then
if grep -rq "$PAGE" --include "*.yml" _topic_maps ; then
DISTROS+=("$(grep -rl "$PAGE" _topic_maps/*.yml)")
fi
done