Skip to content

Handle attempt to combine --dry-run with live configuration (fixes #136) #287

Handle attempt to combine --dry-run with live configuration (fixes #136)

Handle attempt to combine --dry-run with live configuration (fixes #136) #287

# Copyright (C) 2022 Sebastian Pipping <[email protected]>
# 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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Python 3.12
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.12
- 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