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

fix script to run in alpine container

This commit is contained in:
aireilly
2023-12-02 00:46:16 +00:00
committed by openshift-cherrypick-robot
parent 2ee749ece8
commit 9d2f1c63af
2 changed files with 3 additions and 3 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" --include=\*.adoc --exclude-dir={snippets,modules} -e "$MODULES")
UPDATED_ASSEMBLIES=$(grep -rnwl "$REPO_PATH" --exclude-dir={snippets,modules} -e "$MODULES" -- "*.adoc")
# 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" --include "*.yml" _topic_maps ; then
if grep -rq "$PAGE" _topic_maps/*.yml; 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" --exclude-dir={snippets,modules} -e "$MODULES" -- "*.adoc")
# Exit 0 if there are no modified assemblies
if [[ -z "${UPDATED_ASSEMBLIES}" ]]