mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-06-01 23:00:37 +00:00
fix(ci): resolve cp same-file error in build-rvf-node workflow
The copy step was failing with "cp: 'X' and 'X' are the same file" because committed binaries in npm/ subdirs matched the find pattern. Added -maxdepth 1 to only find freshly built files and realpath comparison before cp. Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
parent
9d1309f2b2
commit
e0d2835fc2
1 changed files with 12 additions and 4 deletions
16
.github/workflows/build-rvf-node.yml
vendored
16
.github/workflows/build-rvf-node.yml
vendored
|
|
@ -86,16 +86,24 @@ jobs:
|
|||
- name: Copy binary to platform package
|
||||
shell: bash
|
||||
run: |
|
||||
SRC=$(find crates/rvf/rvf-node -name "rvf-node.*.node" -type f | head -1)
|
||||
SRC=$(find crates/rvf/rvf-node -maxdepth 1 -name "rvf-node.*.node" -type f | head -1)
|
||||
FNAME=$(basename "$SRC")
|
||||
|
||||
# Copy to npm platform package
|
||||
# Copy to npm platform package (avoid same-file error)
|
||||
PLAT_DIR="crates/rvf/rvf-node/npm/${{ matrix.settings.platform }}"
|
||||
mkdir -p "$PLAT_DIR"
|
||||
cp -v "$SRC" "$PLAT_DIR/$FNAME"
|
||||
if [ "$(realpath "$SRC")" != "$(realpath "$PLAT_DIR/$FNAME" 2>/dev/null)" ]; then
|
||||
cp -v "$SRC" "$PLAT_DIR/$FNAME"
|
||||
else
|
||||
echo "Source and dest are same file, skipping copy to platform dir"
|
||||
fi
|
||||
|
||||
# Copy to main rvf-node package
|
||||
cp -v "$SRC" "npm/packages/rvf-node/$FNAME"
|
||||
if [ "$(realpath "$SRC")" != "$(realpath "npm/packages/rvf-node/$FNAME" 2>/dev/null)" ]; then
|
||||
cp -v "$SRC" "npm/packages/rvf-node/$FNAME"
|
||||
else
|
||||
echo "Source and dest are same file, skipping copy to main dir"
|
||||
fi
|
||||
|
||||
echo "=== Platform package ==="
|
||||
ls -lh "$PLAT_DIR/"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue