File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 2222
2323 - name : " Check the sourcecode"
2424 run : ./tools/check-sourcecode
25+
26+ check-generated :
27+ name : " Check Generated Files"
28+ runs-on : ubuntu-latest
29+
30+ steps :
31+
32+ - uses : actions/checkout@v4
33+
34+ - name : Install prerequisites
35+ run : >-
36+ sudo apt-get update
37+
38+ sudo apt-get install -y
39+ asciidoctor
40+
41+ - name : " Verify elf2tag.1 consistency"
42+ run : ./src/update-elf2tag-manpage --ensure-consistency
Original file line number Diff line number Diff line change 2424
2525set -e
2626
27+ ensure_consistency=false
2728case " $1 " in
2829 -h | --help )
2930 ${SED-sed} -n ' /^#\( .*\)$/,$p' " $0 " \
@@ -32,6 +33,9 @@ case "$1" in
3233 | ${SED-sed} ' s|^#$||; s|^# ||'
3334 exit 0
3435 ;;
36+ --ensure-consistency )
37+ ensure_consistency=:
38+ ;;
3539esac
3640
3741cd " $( dirname " $0 " ) "
@@ -56,6 +60,10 @@ if ! ${ASCIIDOCTOR-asciidoctor} -b manpage -D "$tmpdir" elf2tag.1.adoc; then
5660fi
5761
5862if ! test -e elf2tag.1; then
63+ if " $ensure_consistency " ; then
64+ echo " Cannot ensure consistency if there is no old elf2tag.1 file"
65+ exit 1
66+ fi
5967 echo " Generate elf2tag.1"
6068 mv -f " $tmpdir /elf2tag.1" elf2tag.1
6169 rmdir " $tmpdir "
@@ -74,6 +82,12 @@ if ${CMP-cmp} "$tmpdir/elf2tag.1.old" "$tmpdir/elf2tag.1.new" > /dev/null; then
7482 exit 0
7583fi
7684
85+ if " $ensure_consistency " ; then
86+ echo " Error: src/elf2tag.1 is inconsistent with src/elf2tag.1.adoc"
87+ diff -u " $tmpdir /elf2tag.1.old" " $tmpdir /elf2tag.1.new"
88+ exit 1
89+ fi
90+
7791echo " Updating elf2tag.1"
7892mv -f " $tmpdir /elf2tag.1" elf2tag.1
7993rm -f " $tmpdir /elf2tag.1.old"
You can’t perform that action at this time.
0 commit comments