Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
github-token: ${{secrets.GITHUB_TOKEN}}
- name: Approve Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr review --approve "$PR_URL"
Expand Down
65 changes: 31 additions & 34 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ check:
cargo check --workspace --all-targets {{features_flag}}

# Verify that the current version of the crate is not the same as the one published on crates.io
check-if-published: (assert-cmd 'jq')
check-if-published package=main_crate: (assert-cmd 'jq')
#!/usr/bin/env bash
set -euo pipefail
Copy link

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new check-if-published command removes logging of the crate name, which could be useful for debugging version mismatch issues. Consider reintroducing a log for the package name to improve traceability.

Suggested change
set -euo pipefail
set -euo pipefail
echo "Checking crate: '{{package}}'"

Copilot uses AI. Check for mistakes.
LOCAL_VERSION="$({{just_executable()}} get-crate-field version)"
echo "Detected crate version: '$LOCAL_VERSION'"
CRATE_NAME="$({{just_executable()}} get-crate-field name)"
echo "Detected crate name: '$CRATE_NAME'"
PUBLISHED_VERSION="$(cargo search ${CRATE_NAME} | grep "^${CRATE_NAME} =" | sed -E 's/.* = "(.*)".*/\1/')"
LOCAL_VERSION="$({{just_executable()}} get-crate-field version package)"
echo "Detected crate {{package}} version: '$LOCAL_VERSION'"
PUBLISHED_VERSION="$(cargo search --quiet {{package}} | grep "^{{package}} =" | sed -E 's/.* = "(.*)".*/\1/')"
echo "Published crate version: '$PUBLISHED_VERSION'"
if [ "$LOCAL_VERSION" = "$PUBLISHED_VERSION" ]; then
echo "ERROR: The current crate version has already been published."
Expand Down Expand Up @@ -106,8 +104,8 @@ cross-test-ext-aarch64:
-c 'apt-get update && apt-get install -y sqlite3 && tests/test-ext.sh'

# Build and open code documentation
docs:
cargo doc --no-deps --open
docs *args='--open':
DOCS_RS=1 cargo doc --no-deps {{args}} --workspace {{features_flag}}

# Print environment info
env-info:
Expand Down Expand Up @@ -156,32 +154,31 @@ set-min-rusqlite-version: (assert-cmd 'jq')

# Run all unit and integration tests
test: \
( test-one-lib '--no-default-features' '--features' 'trace,hex,md5' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,sha1' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,sha224' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,sha256' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,sha384' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,sha512' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,blake3' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,fnv' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,xxhash' ) \
\
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash' ) \
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,aggregate' ) \
\
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,hex' ) \
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,hex,aggregate' ) \
\
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,trace' ) \
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,trace,aggregate' ) \
\
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,hex,trace' ) \
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,hex,trace,aggregate' )

# Test documentation
test-doc:
cargo test --doc
cargo doc --no-deps
( test-one-lib '--no-default-features' '--features' 'trace,hex,md5' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,sha1' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,sha224' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,sha256' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,sha384' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,sha512' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,blake3' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,fnv' ) \
( test-one-lib '--no-default-features' '--features' 'trace,hex,xxhash' ) \
\
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash' ) \
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,aggregate' ) \
\
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,hex' ) \
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,hex,aggregate' ) \
\
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,trace' ) \
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,trace,aggregate' ) \
\
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,hex,trace' ) \
( test-one-lib '--no-default-features' '--features' 'md5,sha1,sha224,sha256,sha384,sha512,blake3,fnv,xxhash,hex,trace,aggregate' )
cargo test --doc {{features_flag}}

# Test documentation generation
test-doc: (docs '')

# Test extension by loading it into sqlite and running SQL tests
test-ext: build-ext
Expand Down
Loading