Conversation
|
Coverage after merging fix-cd-mv-artifact into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
This PR adjusts the CD workflow’s artifact “rename” step in an attempt to fix artifact movement/renaming during release builds.
Changes:
- Updated the workflow’s
mvinvocation from verbose-only to interactive + verbose (-iv) when renaming the built binary prior to upload.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| src="dist/github-code-search-$(echo '${{ matrix.target }}' | sed 's/^bun-//')" | ||
| [ -f "${src}.exe" ] && src="${src}.exe" | ||
| mv -v "$src" "dist/${{ matrix.artifact }}" | ||
| mv -iv "$src" "dist/${{ matrix.artifact }}" |
There was a problem hiding this comment.
Using mv -i in a GitHub Actions step can block or behave unexpectedly if the destination already exists (it may prompt for confirmation, resulting in a hang or a skipped move). More importantly, for several matrix entries src already equals dist/${{ matrix.artifact }} (e.g., linux and windows), so this mv will fail with “are the same file” regardless of -i. Consider computing dest="dist/${{ matrix.artifact }}" and skipping the move when src == dest, and keep the command non-interactive (e.g., plain mv -v with a pre-check/removal or a no-clobber strategy).
| mv -iv "$src" "dist/${{ matrix.artifact }}" | |
| dest="dist/${{ matrix.artifact }}" | |
| if [ "$src" != "$dest" ]; then | |
| # Ensure we don't get blocked by interactive prompts and avoid | |
| # "are the same file" errors when src == dest. | |
| [ -e "$dest" ] && rm -f "$dest" | |
| mv -v "$src" "$dest" | |
| fi |
No description provided.