File tree Expand file tree Collapse file tree 4 files changed +37
-12
lines changed
Expand file tree Collapse file tree 4 files changed +37
-12
lines changed Original file line number Diff line number Diff line change @@ -28,22 +28,21 @@ jobs:
2828 steps :
2929 - name : Checkout
3030 uses : actions/checkout@v4
31- - name : Setup Pages
32- id : pages
33- uses : actions/configure-pages@v5
3431
3532 - name : Test
3633 run : |
37- podman run -v $PWD:/srv:z --workdir /srv -it --rm fedora \
38- sh -c 'dnf install -y scd2html; \
39- pre="---\nlayout: default\ntitle: Hello\n---\n"; \
40- for file in docs/man/*.scd; do \
41- out=$(basename $file | sed "s/scd$/html/"); \
42- echo -e "$pre" > docs/man/$out; \
43- scd2html -f < $file >> docs/man/$out; \
44- done'
4534
46- sed -i 's|<b>\(rpm[^<]*\)</b>(\(.\))|<a href="\1.\2.html">\1(\2)</a>|g' docs/man/rpm*.html
35+ podman build --target base --tag rpm -f tests/Dockerfile .
36+ mkdir _build
37+ podman run -v $PWD:/srv:z --workdir /srv/_build --rm rpm sh -c \
38+ "cmake .. && make man-html"
39+
40+ # sed -i 's|<b>\(rpm[^<]*\)</b>(\(.\))|<a href="\1.\2.html">\1(\2)</a>|g' docs/man/rpm*.html
41+ mv _build/docs/man/*.html docs/man/
42+
43+ - name : Setup Pages
44+ id : pages
45+ uses : actions/configure-pages@v5
4746
4847 - name : Build with Jekyll
4948 uses : actions/jekyll-build-pages@v1
Original file line number Diff line number Diff line change @@ -19,6 +19,19 @@ foreach(man ${manuals})
1919endforeach ()
2020add_custom_target (man ALL DEPENDS ${manuals} )
2121
22+ set (manuals-html ${manuals} )
23+ list (TRANSFORM manuals-html APPEND .html)
24+ configure_file (post.sh post.sh @ONLY )
25+ foreach (man ${manuals} )
26+ add_custom_command (OUTPUT ${man} .html
27+ COMMAND scd2html -f
28+ < ${CMAKE_CURRENT_SOURCE_DIR} /${man}.scd
29+ > ${man} .html
30+ COMMAND ./post.sh ${man} .html
31+ DEPENDS ${man} .scd )
32+ endforeach ()
33+ add_custom_target (man-html ALL DEPENDS ${manuals-html} )
34+
2235# Install manuals for the enabled features
2336set (manuals ${core} )
2437if (ENABLE_PLUGINS)
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ FILE=$1
4+ NAME=$( echo " $FILE " | sed ' s/^\(.\+\)\.\(.\+\)\.html$/\1(\2)/' )
5+ FRONT_MATTER=" \
6+ ---
7+ layout: default
8+ title: rpm.org - $NAME
9+ ---
10+ "
11+ cat <( echo " $FRONT_MATTER " ) $1 > $1 .tmp
12+ mv $1 .tmp $1
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ RUN dnf -y install \
5252 dwz \
5353 fsverity-utils fsverity-utils-devel \
5454 scdoc \
55+ scd2html \
5556 sequoia-sq \
5657 libasan \
5758 libubsan
You can’t perform that action at this time.
0 commit comments