Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mdman for generating man pages. #8577

Merged
merged 7 commits into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- run: cd crates/crates-io && cargo fmt --all -- --check
- run: cd crates/resolver-tests && cargo fmt --all -- --check
- run: cd crates/cargo-platform && cargo fmt --all -- --check
- run: cd crates/mdman && cargo fmt --all -- --check

test:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -65,6 +66,7 @@ jobs:
- run: cargo test --features 'deny-warnings'
- run: cargo test --features 'deny-warnings' -p cargo-test-support
- run: cargo test -p cargo-platform
- run: cargo test --manifest-path crates/mdman/Cargo.toml

resolver:
runs-on: ubuntu-latest
Expand All @@ -89,6 +91,7 @@ jobs:
- uses: actions/checkout@v2
- run: rustup update nightly && rustup default nightly
- run: rustup component add rust-docs
- run: ci/validate-man.sh
- run: |
mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.3.7/mdbook-v0.3.7-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
Expand Down
26 changes: 26 additions & 0 deletions ci/validate-man.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
# This script validates that there aren't any changes to the man pages.

set -e

cd src/doc

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

./build-man.sh

changes=$(git status --porcelain .)
if [ -n "$changes" ]
then
echo "Detected changes in 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."
exit 1
fi
Loading