Add only filename to the inventory.

This commit is contained in:
Patrick Lehmann
2025-01-16 19:04:47 +01:00
parent 34fb9c9869
commit 3a13486ea6
2 changed files with 4 additions and 4 deletions

View File

@@ -432,11 +432,11 @@ jobs:
# Add asset to JSON inventory # Add asset to JSON inventory
if [[ "${{ inputs.inventory-json }}" != "" ]]; then if [[ "${{ inputs.inventory-json }}" != "" ]]; then
if [[ "${categories}" != "${title}" ]]; then if [[ "${categories}" != "${title}" ]]; then
printf " %s\n" "adding file '${uploadFile}' with '${categories//;/ → }' to JSON inventory ..." printf " %s\n" "adding file '${uploadFile#*/}' with '${categories//;/ → }' to JSON inventory ..."
category="" category=""
jsonEntry=$(jq -c -n \ jsonEntry=$(jq -c -n \
--arg title "${title}" \ --arg title "${title}" \
--arg file "${uploadFile}" \ --arg file "${uploadFile#*/}" \
'{"file": $file, "title": $title}' \ '{"file": $file, "title": $title}' \
) )
@@ -452,7 +452,7 @@ jobs:
'$inventory * {"files": $file}' \ '$inventory * {"files": $file}' \
) )
else else
printf " %s\n" "adding file '${uploadFile}' to JSON inventory ... ${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}" printf " %s\n" "adding file '${uploadFile#*/}' to JSON inventory ... ${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}"
fi fi
fi fi

View File

@@ -15,5 +15,5 @@ sphinxcontrib-mermaid ~= 1.0
autoapi >= 2.0.1 autoapi >= 2.0.1
sphinx_design ~= 0.6.1 sphinx_design ~= 0.6.1
sphinx-copybutton >= 0.5.2 sphinx-copybutton >= 0.5.2
sphinx_autodoc_typehints ~= 2.5 sphinx_autodoc_typehints ~= 3.0
sphinx_reports ~= 0.7 sphinx_reports ~= 0.7