The date in the .TH line of jq.1.prebuilt changed whenever the manual was regenerated in a new month, causing merge conflicts between pull requests that touch the manual, and it did not reflect the release date anyway. Generate the committed man page without a date. Stamp the date into jq.1 at build time instead, taking it from the current commit, or from SOURCE_DATE_EPOCH where that is set, so that release tarballs and distribution builds still carry one and the behaviour added in #3514 is kept. Write it in UTC and in ISO 8601 rather than the previous "%B %Y", for which mandoc reports "cannot parse date, using it verbatim".
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: Building man page, man.test, manonig.test
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '.github/workflows/manpage.yml'
|
|
- 'docs/**'
|
|
- 'tests/man.test'
|
|
- 'tests/manonig.test'
|
|
- 'jq.1.prebuilt'
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/manpage.yml'
|
|
- 'docs/**'
|
|
- 'tests/man.test'
|
|
- 'tests/manonig.test'
|
|
- 'jq.1.prebuilt'
|
|
|
|
jobs:
|
|
manpages:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v7
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v7
|
|
with:
|
|
python-version: '3.11'
|
|
cache: pipenv
|
|
- name: Install pipenv
|
|
run: pip install pipenv
|
|
- name: Install dependencies
|
|
run: pipenv sync
|
|
working-directory: docs
|
|
- name: Validate manual schema
|
|
run: pipenv run python3 validate_manual_schema.py content/manual/**/*.yml
|
|
working-directory: docs
|
|
- name: Configure
|
|
run: |
|
|
autoreconf -i
|
|
./configure --enable-docs
|
|
- name: Build man page, man.test, manonig.test
|
|
run: |
|
|
rm -f jq.1.prebuilt tests/man.test tests/manonig.test
|
|
make jq.1.prebuilt tests/man.test tests/manonig.test
|
|
- name: Make sure that jq.1.prebuilt, man.test, manonig.test are up to date
|
|
run: |
|
|
git diff --exit-code jq.1.prebuilt tests/man.test tests/manonig.test
|