Skip to content

Merge pull request #289 from hartwork/precommit-autoupdate #484

Merge pull request #289 from hartwork/precommit-autoupdate

Merge pull request #289 from hartwork/precommit-autoupdate #484

# Copyright (C) 2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under GPL v3 or later
name: Enforce that copies of --help output are in sync
on:
- pull_request
- push
jobs:
run_pre_commit:
name: Check if copies of --help output are in sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python 3.14
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.14
- name: Install build dependencies
run: |
sudo apt-get install --no-install-recommends -y help2man
- name: Install delete-merged-branches entry point script
run: |-
pip install \
--disable-pip-version-check \
--user \
--no-warn-script-location \
.
echo "PATH=${HOME}/.local/bin:${PATH}" >> "${GITHUB_ENV}"
- name: Check if the man page is in sync with --help output
run: |-
rm git-{delete-merged-branches,dmb}.1 # to enforce a diff for the generator to remove
./sync-manpages-with-help-output.sh
git diff --exit-code -- git-{delete-merged-branches,dmb}.1