-
Notifications
You must be signed in to change notification settings - Fork 16
39 lines (32 loc) · 1.22 KB
/
enforce-copies-of-help-output-in-sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python 3.12
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.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