File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,13 +34,12 @@ elif [ -n "${GITHUB_REPOSITORY:-}" ]; then
3434 sha=${GITHUB_SHA}
3535fi
3636
37- base_url=" https://github.com/${repository} /blob/${sha} "
38-
39- if [ -n " ${base_url} " ]; then
37+ if [ -n " ${sha} " ]; then
38+ base_url=" https://github.com/${repository} /blob/${sha} "
4039 echo " Setting base-url to $base_url "
4140 cp mrdocs.yml mrdocs.yml.bak
4241 perl -i -pe ' s{^\s*base-url:.*$}{base-url: ' " $base_url /" ' }' mrdocs.yml
43- perl -i -pe ' s/ {{BASE_URL}}/ $base_url/g ' html/openmethod/ref_headers.html
42+ perl -i -pe " s[ {{BASE_URL}}][ $base_url ]g " html/openmethod/ref_headers.html
4443fi
4544
4645echo " Building documentation with Antora..."
@@ -58,7 +57,7 @@ for f in $(find html -name '*.html'); do
5857 perl -i -pe ' s{{{(.*?)}}}{<a href="../../../$1.html">$1</a>}g' " $f "
5958done
6059
61- if [ -n " ${base_url :- } " ]; then
60+ if [ -n " ${sha :- } " ]; then
6261 if [ -f mrdocs.yml.bak ]; then
6362 mv -f mrdocs.yml.bak mrdocs.yml
6463 echo " Restored original mrdocs.yml"
You can’t perform that action at this time.
0 commit comments