ci(deploy): Fix deploy output #328
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
tools/config.shto 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 newDEBUGhelper. Many functions now use more idiomatic bash and avoid unnecessary intermediate variables. [1] [2]tools/check-deploy-needed.shto aid troubleshooting and visibility of script state during execution.$GITHUB_OUTPUT, ensuring that output is only written if the variable is set, and using a grouped echo for efficiency.Workflow and CI improvements:
.github/workflows/cron.ymlto allow the build job to run not only for the repository owner but also when triggered manually viaworkflow_dispatch, making CI more flexible..github/workflows/cron_build.ymlfromsourcetobash, 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.