Skip to content

Commit

Permalink
mdman: use cargo build-man everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Apr 28, 2023
1 parent c01bad9 commit e3dec38
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 50 deletions.
15 changes: 8 additions & 7 deletions ci/validate-man.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,25 @@

set -e

cd src/doc
cargo_man="src/doc"
mdman_man="crates/mdman/doc"

changes=$(git status --porcelain -- .)
changes=$(git status --porcelain -- $cargo_man $mdman_man)
if [ -n "$changes" ]
then
echo "git directory must be clean before running this script."
exit 1
fi

./build-man.sh
cargo build-man

changes=$(git status --porcelain -- .)
changes=$(git status --porcelain -- $cargo_man $mdman_man)
if [ -n "$changes" ]
then
echo "Detected changes of man pages in src/doc:"
echo "Detected changes of man pages:"
echo "$changes"
echo
echo "Please run './build-man.sh' in the src/doc directory to rebuild the"
echo "man pages, and commit the changes."
echo 'Please run `cargo build-man` to rebuild the man pages'
echo "and commit the changes."
exit 1
fi
7 changes: 0 additions & 7 deletions crates/mdman/build-man.sh

This file was deleted.

6 changes: 1 addition & 5 deletions src/doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ directory) to three different formats:
3. Plain text (needed for embedded man pages on platforms without man such as
Windows), saved in [`src/doc/man/generated_txt/`](man/generated_txt).

To rebuild the man pages, run the script `build-man.sh` in the `src/doc` directory.

```console
$ ./build-man.sh
```
To rebuild the man pages, run `cargo build-man` inside the workspace.

### SemVer chapter tests

Expand Down
31 changes: 0 additions & 31 deletions src/doc/build-man.sh

This file was deleted.

0 comments on commit e3dec38

Please sign in to comment.