File tree Expand file tree Collapse file tree 3 files changed +32
-9
lines changed
Expand file tree Collapse file tree 3 files changed +32
-9
lines changed Original file line number Diff line number Diff line change @@ -34,16 +34,14 @@ jobs:
3434
3535 - name : Test
3636 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'
4537
46- sed -i 's|<b>\(rpm[^<]*\)</b>(\(.\))|<a href="\1.\2.html">\1(\2)</a>|g' docs/man/rpm*.html
38+ podman build --target base --tag rpm -f tests/Dockerfile .
39+ mkdir _build
40+ podman run -v $PWD:/srv:z --workdir /srv/_build --rm rpm sh -c \
41+ "cmake .. && make man-html"
42+
43+ # sed -i 's|<b>\(rpm[^<]*\)</b>(\(.\))|<a href="\1.\2.html">\1(\2)</a>|g' docs/man/rpm*.html
44+ mv _build/docs/man/*.html docs/man/
4745
4846 - name : Build with Jekyll
4947 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 " $1 " | 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
You can’t perform that action at this time.
0 commit comments