mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-09-25 03:38:22 +08:00
The bash version spent most of its lines on plumbing: parsing a report back out of a per-commit `brew ruby` child, awk and herestrings for set logic, bash 3.2 workarounds, and a trap to restore the tap. The job itself is small and lives inside Homebrew anyway, so run the whole thing under Homebrew's Ruby and call its tap, formula and bottle APIs directly. One process instead of one Homebrew startup per candidate commit, the tap checkout restored by ensure, tarballs checked with Net::HTTP, and no second language embedded in a string. Formulary.clear_cache and Tap#clear_cache between checkouts keep each candidate's formulae fresh. GITHUB_OUTPUT still arrives because brew forwards GITHUB_* whenever CI is set. Same walk, same exemption for formulae unbottled at the pin, same outputs; verified to pick the same commit as the bash version. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Ramon Roche <mrpollo@gmail.com>