.PHONY: build test test-e2e lint lint-md fmt check audit msrv release install clean release-patch release-minor release-major
build:
cargo build
test:
cargo test --locked --all-targets
test-e2e:
@set -a; \
if [ -f .env.e2e ]; then . ./.env.e2e; fi; \
set +a; \
export SERVICENOW_E2E_SINCE=$$(date +%s); \
cargo test --test e2e -- --ignored --test-threads=1 && \
cargo test --test e2e_leftovers -- --ignored --nocapture
lint: lint-md
cargo fmt -- --check
cargo clippy --locked --all-targets -- -D warnings
lint-md:
uv run --locked --only-group dev rumdl check $$(git ls-files '*.md')
fmt:
cargo fmt
audit:
@command -v cargo-audit >/dev/null 2>&1 || cargo install cargo-audit --version 0.22.2 --locked
cargo audit
msrv:
$(eval MSRV := $(shell sed -n 's/^rust-version = "\(.*\)"/\1/p' Cargo.toml))
rustup toolchain install $(MSRV) --profile minimal >/dev/null
cargo +$(MSRV) check --locked --all-targets
check: lint test
release:
cargo build --release
install: check release
cp target/release/servicenow ~/.local/bin/servicenow
clean:
cargo clean
release-patch:
vership bump patch
release-minor:
vership bump minor
release-major:
vership bump major