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

Fixing get-updated-distros.sh

This commit is contained in:
aireilly
2023-10-11 11:48:27 +01:00
parent 0841b59d17
commit 66eb8a1b4e

View File

@@ -3,9 +3,17 @@
# Returns a list of updated _topic_map.yml files.
# The list includes any topic maps that are themselves modified, and indirectly modifed topic maps where incldued AsciiDoc files have been updated.
# Handle the git diff differently for Travis and local
# Get the *.adoc and distro maps files in the pull request
FILES=$(git diff --name-only HEAD HEAD~$(git rev-list --count --no-merges origin/enterprise-4.14..) --diff-filter=d "*.yml" "*.adoc" ':(exclude)_unused_topics/*')
if [ "$TRAVIS" = true ] ; then
FILES=$(git diff --name-only HEAD $TRAVIS_BRANCH --diff-filter=d "*.yml" "*.adoc" ':(exclude)_unused_topics/*')
else
FILES=$(git diff --name-only HEAD@{1} --diff-filter=d "*.yml" "*.adoc" ':(exclude)_unused_topics/*')
fi
REPO_PATH=$(git rev-parse --show-toplevel)
# Init an empty array
DISTROS=()
@@ -39,7 +47,7 @@ for ASSEMBLY in $ALL_ASSEMBLIES; do
fi
done
# Handle modified topic maps
# Handle modified topic maps
UPDATED_DISTROS=$(echo "$FILES" | awk '/_topic_maps\/(.*)\.yml/')
# Concat all the updated topic maps
DISTROS+=("${UPDATED_DISTROS}")