Class: Homebrew::TestBot::CleanupBefore Private
- Inherits:
-
TestCleanup
- Object
- Test
- TestCleanup
- Homebrew::TestBot::CleanupBefore
- Defined in:
- test_bot/cleanup_before.rb
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Instance Attribute Summary
Attributes inherited from Test
Instance Method Summary collapse
- #cleanup_github_actions_hosted_runner ⇒ void private
- #run!(args:) ⇒ void private
Methods inherited from Test
Methods included from Utils::Output::Mixin
#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #pretty_upgradable
Instance Method Details
#cleanup_github_actions_hosted_runner ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
29 |
# File 'test_bot/cleanup_before.rb', line 29 def cleanup_github_actions_hosted_runner; end |
#run!(args:) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'test_bot/cleanup_before.rb', line 8 def run!(args:) test_header(:CleanupBefore) if tap.to_s != CoreTap.instance.name && CoreTap.instance.installed? reset_if_needed(CoreTap.instance.path.to_s) end Pathname.glob("*.bottle*.*").each(&:unlink) if ENV["HOMEBREW_GITHUB_ACTIONS"] && !ENV["GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED"] # minimally fix brew doctor failures (a full clean takes ~5m) cleanup_github_actions_hosted_runner test "brew", "cleanup", "--prune-prefix" end # Keep all "brew" invocations after cleanup_shared # (which cleans up Homebrew/brew) cleanup_shared end |