From 5a905063177cb4ffcfbded631382739bee58c3a9 Mon Sep 17 00:00:00 2001 From: Martin Frost Date: Sat, 25 Dec 2021 18:31:49 +0100 Subject: [PATCH] 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 --- .github/workflows/ci.yml | 3 +++ build-manpages.sh | 6 ++++++ docs/git-add-coauthor.md | 3 +++ docs/git-delete-coauthor.md | 3 +++ docs/git-edit-coauthor.md | 3 +++ docs/git-mob.md | 3 +++ docs/git-solo.md | 3 +++ 7 files changed, 24 insertions(+) create mode 100755 build-manpages.sh create mode 100644 docs/git-add-coauthor.md create mode 100644 docs/git-delete-coauthor.md create mode 100644 docs/git-edit-coauthor.md create mode 100644 docs/git-mob.md create mode 100644 docs/git-solo.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec3e91b..638fd79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,10 +37,13 @@ jobs: profile: minimal toolchain: stable override: true + - run: cargo install mdsh mandown - run: cargo build --release + - run: ./build-manpages.sh - uses: actions/upload-artifact@v2 with: name: git-mob-${{ matrix.os }} path: | target/release/git-* + target/man !target/release/*.d diff --git a/build-manpages.sh b/build-manpages.sh new file mode 100755 index 0000000..3bb9537 --- /dev/null +++ b/build-manpages.sh @@ -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 diff --git a/docs/git-add-coauthor.md b/docs/git-add-coauthor.md new file mode 100644 index 0000000..ddeb26e --- /dev/null +++ b/docs/git-add-coauthor.md @@ -0,0 +1,3 @@ +# git-add-coauthor + + diff --git a/docs/git-delete-coauthor.md b/docs/git-delete-coauthor.md new file mode 100644 index 0000000..827f8c0 --- /dev/null +++ b/docs/git-delete-coauthor.md @@ -0,0 +1,3 @@ +# git-delete-coauthor + + diff --git a/docs/git-edit-coauthor.md b/docs/git-edit-coauthor.md new file mode 100644 index 0000000..cab2ed7 --- /dev/null +++ b/docs/git-edit-coauthor.md @@ -0,0 +1,3 @@ +# git-edit-coauthor + + diff --git a/docs/git-mob.md b/docs/git-mob.md new file mode 100644 index 0000000..c08742d --- /dev/null +++ b/docs/git-mob.md @@ -0,0 +1,3 @@ +# git-mob + + diff --git a/docs/git-solo.md b/docs/git-solo.md new file mode 100644 index 0000000..d37a9fa --- /dev/null +++ b/docs/git-solo.md @@ -0,0 +1,3 @@ +# git-solo + +