Repository navigation
Add GitHub Actions checks, test script, and skip-main flag to uki-setup - #4
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5311302fcf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| phase_disable_bls_plugins | ||
| phase_initial_build | ||
| phase_summary | ||
| if [[ "${UKI_SETUP_SKIP_MAIN:-0}" -ne 1 ]]; then |
There was a problem hiding this comment.
Handle skip-main flag without arithmetic evaluation
The new UKI_SETUP_SKIP_MAIN guard uses -ne, which triggers arithmetic evaluation under set -u; if a caller sets UKI_SETUP_SKIP_MAIN to a common string boolean like true/false, Bash treats that token as a variable name and exits with an unbound-variable error before any phase runs. This makes the script unexpectedly fail in automation environments that pass string-valued env flags instead of numeric 0/1.
Useful? React with 👍 / 👎.
Motivation
uki-setup.shand its generated artifacts in a Fedora container on push and PRs.Description
.github/workflows/checks.ymlwhich runs a Fedora container, installs shell tooling, and executesbash -n,shellcheck, and the project check script.tests/test_uki_setup.shwhich setsUKI_SETUP_SKIP_MAIN=1, sourcesuki-setup.sh, invokesphase_write_build_scriptandphase_write_plugin, and validates template substitution and generated file contents.README.md.uki-setup.shto replacels -lh "${EFI_DIR}"*.efiwithfind "${EFI_DIR}" -maxdepth 1 -type f -name "*.efi" -exec ls -lh {} +to avoid shell glob issues.if [[ "${UKI_SETUP_SKIP_MAIN:-0}" -ne 1 ]]; then ... fiso tests can source the file safely.Testing
bash -n uki-setup.sh tests/test_uki_setup.shto verify Bash syntax, which succeeded.shellcheck -P . uki-setup.sh tests/test_uki_setup.shto lint the scripts, which succeeded.bash tests/test_uki_setup.shto validate generated artifacts and template substitution, which succeeded.Codex Task