@@ -23,14 +23,12 @@ check:
2323 cargo check --workspace --all-targets {{ features_flag}}
2424
2525# Verify that the current version of the crate is not the same as the one published on crates.io
26- check-if-published : (assert-cmd ' jq' )
26+ check-if-published package = main_crate : (assert-cmd ' jq' )
2727 #!/usr/bin/env bash
2828 set -euo pipefail
29- LOCAL_VERSION=" $( {{just_executable()}} get-crate-field version) "
30- echo " Detected crate version: '$LOCAL_VERSION '"
31- CRATE_NAME=" $( {{just_executable()}} get-crate-field name) "
32- echo " Detected crate name: '$CRATE_NAME '"
33- PUBLISHED_VERSION=" $( cargo search ${CRATE_NAME} | grep " ^${CRATE_NAME} =" | sed -E ' s/.* = "(.*)".*/\1/' ) "
29+ LOCAL_VERSION=" $( {{just_executable()}} get-crate-field version package) "
30+ echo " Detected crate {{package}} version: '$LOCAL_VERSION '"
31+ PUBLISHED_VERSION=" $( cargo search --quiet {{package}} | grep " ^{{package}} =" | sed -E ' s/.* = "(.*)".*/\1/' ) "
3432 echo " Published crate version: '$PUBLISHED_VERSION '"
3533 if [ " $LOCAL_VERSION " = " $PUBLISHED_VERSION " ]; then
3634 echo " ERROR: The current crate version has already been published."
@@ -65,8 +63,8 @@ coverage *args='--no-clean --open': (cargo-install 'cargo-llvm-cov')
6563 cargo llvm-cov --workspace --all-targets {{ features_flag}} --include-build-script {{ args}}
6664
6765# Build and open code documentation
68- docs :
69- cargo doc --no-deps --open
66+ docs * args = ' --open' :
67+ DOCS_RS= 1 cargo doc --no-deps {{ args }} --workspace {{ features_flag }}
7068
7169# Print environment info
7270env -info:
@@ -108,11 +106,10 @@ semver *args: (cargo-install 'cargo-semver-checks')
108106# Run all unit and integration tests
109107test :
110108 cargo test --workspace --all-targets {{ features_flag}}
111-
112- # Test documentation
113- test-doc :
114109 cargo test --doc {{ features_flag}}
115- cargo doc {{ features_flag}} --no-deps
110+
111+ # Test documentation generation
112+ test-doc : (docs ' ' )
116113
117114# Test code formatting
118115test-fmt :
0 commit comments