Skip to content

Commit 5cf988b

Browse files
committed
more ci updates
1 parent f69bc00 commit 5cf988b

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[![docs.rs docs](https://docs.rs/tilejson/badge.svg)](https://docs.rs/tilejson)
66
[![license](https://img.shields.io/crates/l/tilejson.svg)](https://github.com/georust/tilejson/blob/main/LICENSE-APACHE)
77
[![CI build](https://github.com/georust/tilejson/actions/workflows/ci.yml/badge.svg)](https://github.com/georust/tilejson/actions)
8+
[![Codecov](https://img.shields.io/codecov/c/github/georust/tilejson)](https://app.codecov.io/gh/georust/tilejson)
89

910
`tilejson` is a crate for serializing/deserializing the [TileJSON](https://github.com/mapbox/tilejson-spec) format — an open standard for representing map metadata.
1011

justfile

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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
7270
env-info:
@@ -108,11 +106,10 @@ semver *args: (cargo-install 'cargo-semver-checks')
108106
# Run all unit and integration tests
109107
test:
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
118115
test-fmt:

0 commit comments

Comments
 (0)