Skip to content

Commit

Permalink
Remove bottle cache hard linking
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 committed Nov 22, 2023
1 parent eca29a3 commit 2e35180
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
6 changes: 0 additions & 6 deletions lib/test_bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,6 @@ def run!(args)
"[email protected]"

Homebrew.failed = !TestRunner.run!(tap, git: GIT, args: args)
ensure
if HOMEBREW_CACHE.exist?
Dir.glob("*.bottle*.tar.gz") do |bottle_file|
FileUtils.rm_f HOMEBREW_CACHE/bottle_file
end
end
end
end
end
17 changes: 0 additions & 17 deletions lib/tests/formulae.rb
Original file line number Diff line number Diff line change
Expand Up @@ -280,23 +280,6 @@ def bottle_reinstall_formula(formula, new_formula, args:)
test "brew", "bottle", *bottle_merge_args
test "brew", "uninstall", "--force", formula.full_name

bottle_json = JSON.parse(@bottle_json_filename.read)
root_url = bottle_json.dig(formula.full_name, "bottle", "root_url")
filename = bottle_json.dig(formula.full_name, "bottle", "tags").values.first["filename"]

# Test bottle is never uploaded, so we need to stub a cached download.
download_strategy = CurlGitHubPackagesDownloadStrategy.new(
"#{root_url}/#{filename}",
formula.name,
formula.version,
)
download_strategy.resolved_basename = @bottle_filename.basename.to_s
download_strategy.cached_location.parent.mkpath
FileUtils.ln @bottle_filename, download_strategy.cached_location, force: true
FileUtils.ln_s download_strategy.cached_location.relative_path_from(download_strategy.symlink_location),
download_strategy.symlink_location,
force: true

@testing_formulae.delete(formula.name)

unless @unchanged_build_dependencies.empty?
Expand Down

0 comments on commit 2e35180

Please sign in to comment.