mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-22 21:09:58 +00:00
28 lines
564 B
Bash
Executable File
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
|