Files
lancedb/ci/update_lockfiles.sh
Will Jones 1eb1beecd6 ci: remove more mentions of node (#2595)
I promise this time I tested it locally :)
2025-08-15 11:01:02 -07:00

28 lines
564 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
AMEND=false
for arg in "$@"; do
if [[ "$arg" == "--amend" ]]; then
AMEND=true
fi
done
# This updates the lockfile without building
cargo metadata --quiet > /dev/null
pushd nodejs || exit 1
npm install --package-lock-only --silent
popd
if git diff --quiet --exit-code; then
echo "No lockfile changes to commit; skipping amend."
elif $AMEND; then
git add Cargo.lock nodejs/package-lock.json
git commit --amend --no-edit
else
git add Cargo.lock nodejs/package-lock.json
git commit -m "Update lockfiles"
fi