Add skeleton manpages

These use `mdsh` and `mandown` in order to automatically insert the
`help` messages into the markdown files, and then compile them to proper
manpages files.

Try to build manpages with the rest of the build
This commit is contained in:
Martin Frost 2021-12-25 18:31:49 +01:00
parent 4de268ee20
commit 5a90506317
7 changed files with 24 additions and 0 deletions

View File

@ -37,10 +37,13 @@ jobs:
profile: minimal profile: minimal
toolchain: stable toolchain: stable
override: true override: true
- run: cargo install mdsh mandown
- run: cargo build --release - run: cargo build --release
- run: ./build-manpages.sh
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: git-mob-${{ matrix.os }} name: git-mob-${{ matrix.os }}
path: | path: |
target/release/git-* target/release/git-*
target/man
!target/release/*.d !target/release/*.d

6
build-manpages.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
mkdir -p target/man
for page in git-{mob,solo,{add,edit,delete}-coauthor}; do
mdsh --work_dir . -o - -i docs/$page.md | mandown - ${page^^} 1 | gzip > target/man/$page.1.gz
done

3
docs/git-add-coauthor.md Normal file
View File

@ -0,0 +1,3 @@
# git-add-coauthor
<!-- `$ cargo run --bin git-add-coauthor -- --help` -->

View File

@ -0,0 +1,3 @@
# git-delete-coauthor
<!-- `$ cargo run --bin git-delete-coauthor -- --help` -->

View File

@ -0,0 +1,3 @@
# git-edit-coauthor
<!-- `$ cargo run --bin git-edit-coauthor -- --help` -->

3
docs/git-mob.md Normal file
View File

@ -0,0 +1,3 @@
# git-mob
<!-- `$ cargo run --bin git-mob -- --help` -->

3
docs/git-solo.md Normal file
View File

@ -0,0 +1,3 @@
# git-solo
<!-- `$ cargo run --bin git-solo -- --help` -->