Update release_from_version.yml
This commit is contained in:
14
.github/workflows/release_from_version.yml
vendored
14
.github/workflows/release_from_version.yml
vendored
@@ -272,8 +272,20 @@ jobs:
|
|||||||
|
|
||||||
# Require a manifest at the root of ROOT.
|
# Require a manifest at the root of ROOT.
|
||||||
MANIFEST=""
|
MANIFEST=""
|
||||||
|
|
||||||
|
# Primary: templateDetails.xml at root
|
||||||
if [ -f "${ROOT}/templateDetails.xml" ]; then
|
if [ -f "${ROOT}/templateDetails.xml" ]; then
|
||||||
MANIFEST="${ROOT}/templateDetails.xml"
|
MANIFEST="${ROOT}/templateDetails.xml"
|
||||||
|
|
||||||
|
# Secondary: standard Joomla template layouts
|
||||||
|
elif [ -f "src/templates/templateDetails.xml" ]; then
|
||||||
|
MANIFEST="src/templates/templateDetails.xml"
|
||||||
|
|
||||||
|
# Tertiary: namespaced Joomla template layout src/templates/<template-name>/templateDetails.xml
|
||||||
|
elif find "src/templates" -mindepth 2 -maxdepth 2 -name "templateDetails.xml" -type f | grep -q .; then
|
||||||
|
MANIFEST="$(find "src/templates" -mindepth 2 -maxdepth 2 -name "templateDetails.xml" -type f | head -n 1)"
|
||||||
|
|
||||||
|
# Fallback: any root-level XML with an <extension> element
|
||||||
else
|
else
|
||||||
while IFS= read -r -d '' f; do
|
while IFS= read -r -d '' f; do
|
||||||
if grep -qE '<extension[[:space:]>]' "${f}"; then
|
if grep -qE '<extension[[:space:]>]' "${f}"; then
|
||||||
@@ -282,6 +294,8 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
done < <(find "${ROOT}" -maxdepth 1 -type f -name "*.xml" -print0)
|
done < <(find "${ROOT}" -maxdepth 1 -type f -name "*.xml" -print0)
|
||||||
fi
|
fi
|
||||||
|
done < <(find "${ROOT}" -maxdepth 1 -type f -name "*.xml" -print0)
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "${MANIFEST}" ]; then
|
if [ -z "${MANIFEST}" ]; then
|
||||||
echo "ERROR: No Joomla manifest XML found at root of ${ROOT}."
|
echo "ERROR: No Joomla manifest XML found at root of ${ROOT}."
|
||||||
|
|||||||
Reference in New Issue
Block a user