chore: make server-check a workspace member

This commit is contained in:
Weihang Lo 2023-04-19 22:37:40 +01:00
parent c3e3d90324
commit ff216ebc96
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7
4 changed files with 10 additions and 2 deletions

View File

@ -185,7 +185,8 @@ jobs:
- run: rustup component add rust-docs - run: rustup component add rust-docs
- run: ci/validate-man.sh - run: ci/validate-man.sh
# This requires rustfmt, use stable. # This requires rustfmt, use stable.
- run: cd src/doc/semver-check && cargo +stable run - name: Run semver-check
run: cargo +stable run -p semver-check
- run: | - run: |
mkdir mdbook mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.27/mdbook-v0.4.27-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.27/mdbook-v0.4.27-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook

7
Cargo.lock generated
View File

@ -2779,6 +2779,13 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "semver-check"
version = "0.1.0"
dependencies = [
"tempfile",
]
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.160" version = "1.0.160"

View File

@ -25,7 +25,7 @@ const SEPARATOR: &str = "///////////////////////////////////////////////////////
fn doit() -> Result<(), Box<dyn Error>> { fn doit() -> Result<(), Box<dyn Error>> {
let filename = std::env::args() let filename = std::env::args()
.nth(1) .nth(1)
.unwrap_or_else(|| "../src/reference/semver.md".to_string()); .unwrap_or_else(|| "src/doc/src/reference/semver.md".to_string());
let contents = fs::read_to_string(filename)?; let contents = fs::read_to_string(filename)?;
let mut lines = contents.lines().enumerate(); let mut lines = contents.lines().enumerate();