Skip to content

Commit 749a86e

Browse files
committed
ci: fix api links patching
Fix patching of api links so that URLs properly lead to the zoomin doxygen bundle. Signed-off-by: Bartosz Gentkowski <bartosz.gentkowski@nordicsemi.no>
1 parent 1eb2d68 commit 749a86e

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

.github/workflows/docs.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,15 @@ jobs:
106106
sed -i 's/__VERSION__/'"$VERSION"'/g' "$OUTDIR/tags.yml"
107107
108108
# Patch links from Sphinx to other Doxygen APIs (combined)
109-
find doc/_build/html/$docset -type f -name "*.html" -exec \
110-
sed -ri "/href=\"([^\"]+)\/([a-z]+)\/doxygen\/html\/([^\"]+)\"/{s//href=\"..\/..\/\1\/\2-apis-$VERSION\/page\/\3\"/g; :a s/__/_/g;ta; }" {} \;
109+
find doc/_build/html/$docset -type f -name "*.html" -exec sed -ri "/href=\"([^\"]+)\/([a-z]+)\/doxygen\/html\/([^\"]+)\"/{s//href=\"\/bundle\/\1\/\2-apis-$VERSION\/page\/\3\"/g; :a s/__/_/g;ta; }" {} \;
111110
112111
for doxset in "${DOXYGEN[@]}"; do
113112
# Patch links from Sphinx to other Doxygen APIs (standalone)
114-
find doc/_build/html/$docset -type f -name "*.html" -exec \
115-
sed -ri "/href=\"([^\"]+)\/$doxset\/html\/([^\"]+)\"/{s//href=\"..\/..\/\1\/$doxset-apis-$VERSION\/page\/\2\"/g; :a s/__/_/g;ta; }" {} \;
113+
find doc/_build/html/$docset -type f -name "*.html" -exec sed -ri "/href=\"([^\"]+)\/$doxset\/html\/([^\"]+)\"/{s//href=\"\/bundle\/\1\/$doxset-apis-$VERSION\/page\/\2\"/g; :a s/__/_/g;ta; }" {} \;
116114
done
117115
118116
# Patch links from Sphinx to same docset Doxygen APIs
119-
find doc/_build/html/$docset -type f -name "*.html" -exec \
120-
sed -ri "/href=\"([^\"]+)\/doxygen\/html\/([^\"]+)\"/{s//href=\"\1\/..\/..\/..\/$docset-apis-$VERSION\/page\/\2\"/g; :a s/__/_/g;ta; }" {} \;
117+
find doc/_build/html/$docset -type f -name "*.html" -exec sed -ri "/href=\"([^\"]+)\/doxygen\/html\/([^\"]+)\"/{s//href=\"\/bundle\/$docset-apis-$VERSION\/page\/\2\"/g; :a s/__/_/g;ta; }" {} \;
121118
122119
pushd "$OUTDIR"
123120
ARCHIVE="$docset-apis-$VERSION.zip"

0 commit comments

Comments
 (0)