Skip to content

Commit

Permalink
ci(lint): use package metadata for msrv workaround
Browse files Browse the repository at this point in the history
Refs: #66
  • Loading branch information
Xenira committed Nov 2, 2023
1 parent aaa0198 commit f8a1dd7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ jobs:
select(.name | ascii_downcase | test(\"linux.*x86_64|x86_64.*linux\")).browser_download_url" | \
wget -qi -
tar -xvf cargo-msrv*.tar* -C ~/.cargo/bin/ cargo-msrv
printf "%s" "Checking MSRV..."
# Workaround for https://github.com/foresterre/cargo-msrv/issues/590
cargo msrv --output-format json --path crates/daktilo verify | tail -n 1 | jq --exit-status '.success'
cargo msrv --output-format json --path crates/daktilo_lib verify | tail -n 1 | jq --exit-status '.success'
for package in $(cargo metadata --format-version 1 --no-deps | jq -r ".workspace_members[]" | awk '{print $1}'); do
version=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name | test("^daktilo$")) | .rust_version')
printf "Checking MSRV $version for $package..."
echo -e "[package.metadata]\nmsrv = \"${version}\"" >> "crates/${package}/Cargo.toml"
cargo msrv --output-format json --path "crates/${package}" verify | tail -n 1 | jq --exit-status '.success'
done
4 changes: 0 additions & 4 deletions crates/daktilo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,3 @@ pkg-config = '*'
[package.metadata.wix]
upgrade-guid = "51610A8E-55C9-4F49-8C9F-3529499D5C60"
path-guid = "2198A7FB-5F3C-4FAB-B253-2314115AD2DD"

# Workaround for https://github.com/foresterre/cargo-msrv/issues/590
[package.metadata]
msrv = "1.70.0"
2 changes: 1 addition & 1 deletion crates/daktilo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#![warn(missing_docs)]

/// Cli argument parsing.
/// CLI argument parser.
///
/// Needs to be in a lib for completions and mangen.
pub mod args;
4 changes: 0 additions & 4 deletions crates/daktilo_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,3 @@ colored.workspace = true

[dev-dependencies]
pretty_assertions.workspace = true

# Workaround for https://github.com/foresterre/cargo-msrv/issues/590
[package.metadata]
msrv = "1.70.0"

0 comments on commit f8a1dd7

Please sign in to comment.