Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

pull: Fix fetching of x86_64_linux bottles #17

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion Library/Homebrew/cmd/pull.rb
Expand Up @@ -516,7 +516,11 @@ def verify_bintray_published(formulae_names)
opoo "Cannot publish bottle: Failed reading info for formula #{f.full_name}"
next
end
bottle_info = jinfo.bottle_info(jinfo.bottle_tags.first)
if f.tap.remote.include?("Linuxbrew") && jinfo.bottle_tags.include?("x86_64_linux")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This incantation of f.tap.remote.include?("Linuxbrew") has come up a few times now. Would you like to factor out a tap.linux? function? It can be done in its own PR either before or after this PR as you see fit.

Copy link
Contributor Author

@rwhogg rwhogg May 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that it'd be nice. Will spin off its own issue for it though, since otherwise I'd be changing a lot more stuff on this PR than I'd like to.

EDIT: spun off as #18

bottle_info = jinfo.bottle_info("x86_64_linux")
else
bottle_info = jinfo.bottle_info(jinfo.bottle_tags.first)
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For improved style use

bottle_info = jinfo.bottle_info(tap.linux? : "x86_64_linux" : jinfo.bottle_tags.first)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the interest of making it easier for everyone to bottle, I've decided to add this as another criteria for #18

unless bottle_info
opoo "No bottle defined in formula #{f.full_name}"
next
Expand Down