Skip to content

Conversation

@lucasssvaz
Copy link
Member

@lucasssvaz lucasssvaz commented Nov 10, 2025

Description

This pull request refactors and improves the shell scripts and workflow files used for building and deploying libraries in the repository. The main focus is on making the scripts more robust, readable, and maintainable by fixing quoting issues, improving error handling, adding debugging output, and refactoring functions for clarity and consistency. It also updates workflow logic to allow manual dispatch and corrects how scripts are invoked.

Shell script robustness and maintainability:

  • Refactored all shell scripts in tools/config.sh to use proper quoting for variable expansions, preventing bugs when variables are empty or contain spaces. Functions are rewritten for clarity, with improved error handling and debug output via a new DEBUG helper. Many functions now use more idiomatic bash and avoid unnecessary intermediate variables. [1] [2]
  • Added debug output statements throughout tools/check-deploy-needed.sh to aid troubleshooting and visibility of script state during execution.
  • Improved logic for checking and writing output variables to $GITHUB_OUTPUT, ensuring that output is only written if the variable is set, and using a grouped echo for efficiency.

Workflow and CI improvements:

  • Updated .github/workflows/cron.yml to allow the build job to run not only for the repository owner but also when triggered manually via workflow_dispatch, making CI more flexible.
  • Changed the invocation of the deployment check script in .github/workflows/cron_build.yml from source to bash, ensuring correct execution semantics for the script.

These changes collectively make the build and deployment process more reliable, easier to debug, and simpler to maintain.

@lucasssvaz lucasssvaz requested a review from me-no-dev November 10, 2025 11:49
@lucasssvaz lucasssvaz self-assigned this Nov 10, 2025
@lucasssvaz lucasssvaz added the bug 🐞 Inconsistencies or issues which will cause a problem for users or implementers. label Nov 10, 2025
@lucasssvaz lucasssvaz force-pushed the fix/deploy branch 2 times, most recently from 5a7c1c0 to 67f4186 Compare November 10, 2025 12:20
@lucasssvaz lucasssvaz changed the title ci(deploy): Fix check for GITHUB_OUTPUT ci(deploy): Fix deploy output Nov 10, 2025
@me-no-dev me-no-dev merged commit aabf62d into espressif:master Nov 10, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐞 Inconsistencies or issues which will cause a problem for users or implementers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants