Name CI artifacts by WLED_RELEASE_NAME instead of PlatformIO env#5545
Name CI artifacts by WLED_RELEASE_NAME instead of PlatformIO env#5545
Conversation
PR build artifact zips are now named firmware-<RELEASE_NAME> (e.g. firmware-ESP32.zip) rather than firmware-<pio_env> (e.g. firmware-esp32dev.zip), making it easier for users to identify the correct build when testing PRs.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe GitHub Actions build workflow adds a step that inspects Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/build.yml (1)
69-69: Optional: avoid parsinglsoutput; use a bash glob instead.
ls build_output/release/*.bin 2>/dev/null | head -1relies on parsinglsand on the quirk that command substitution swallows the failing exit status (when no files match, bash passes the literal pattern tols). Anullglobarray orfind -print -quitis more robust and clearer in intent.♻️ Proposed refactor
- bin=$(ls build_output/release/*.bin 2>/dev/null | head -1) - if [ -n "$bin" ]; then + shopt -s nullglob + bins=(build_output/release/*.bin) + if [ ${`#bins`[@]} -gt 0 ]; then + bin="${bins[0]}" # Strip WLED_<version>_ prefix from WLED_<version>_<RELEASE_NAME>.bin base=$(basename "$bin" .bin) release_name=$(echo "$base" | sed 's/^WLED_[^_]*_//') echo "name=firmware-$release_name" >> $GITHUB_OUTPUT else echo "name=firmware-${{ matrix.environment }}" >> $GITHUB_OUTPUT fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build.yml at line 69, The current command substitution using "bin=$(ls build_output/release/*.bin 2>/dev/null | head -1)" is fragile; replace it with a robust shell pattern or find-based approach: enable bash nullglob and pick the first element of the glob array (e.g., set nullglob and use the first entry of build_output/release/*.bin) or use find with -print -quit to produce a single path and assign it to the bin variable. Update the assignment to use the chosen approach so that the bin variable is empty or unset when no files exist and avoid parsing ls output.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/build.yml:
- Line 69: The current command substitution using "bin=$(ls
build_output/release/*.bin 2>/dev/null | head -1)" is fragile; replace it with a
robust shell pattern or find-based approach: enable bash nullglob and pick the
first element of the glob array (e.g., set nullglob and use the first entry of
build_output/release/*.bin) or use find with -print -quit to produce a single
path and assign it to the bin variable. Update the assignment to use the chosen
approach so that the bin variable is empty or unset when no files exist and
avoid parsing ls output.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b5c39717-c8db-46fa-b41e-c40a4896b5cd
📒 Files selected for processing (1)
.github/workflows/build.yml
PR build artifact zips are now named firmware-<RELEASE_NAME> (e.g. firmware-ESP32.zip) rather than firmware-<pio_env> (e.g. firmware-esp32dev.zip), making it easier for users to identify the correct build when testing PRs, so they don't have to handle two different naming conventions between release and PR
Summary by CodeRabbit