commit
513c179e60
@ -122,7 +122,7 @@ module Homebrew
|
|||||||
matches.map do |match|
|
matches.map do |match|
|
||||||
filename = File.basename(match["path"], ".rb")
|
filename = File.basename(match["path"], ".rb")
|
||||||
tap = Tap.fetch(match["repository"]["full_name"])
|
tap = Tap.fetch(match["repository"]["full_name"])
|
||||||
next if tap.installed? && !(tap.user == "Homebrew" && tap.repo.start_with?("cask"))
|
next if tap.installed? && !tap.name.start_with?("homebrew/cask")
|
||||||
"#{tap.name}/#{filename}"
|
"#{tap.name}/#{filename}"
|
||||||
end.compact
|
end.compact
|
||||||
end
|
end
|
||||||
|
|||||||
@ -13,20 +13,17 @@ class Tap
|
|||||||
|
|
||||||
old_name = name
|
old_name = name
|
||||||
old_path = path
|
old_path = path
|
||||||
old_remote = path.git_origin
|
old_remote = remote
|
||||||
|
|
||||||
|
clear_cache
|
||||||
super(new_user, new_repo)
|
super(new_user, new_repo)
|
||||||
|
|
||||||
@repo_var = nil
|
|
||||||
|
|
||||||
new_initial_revision_var = "HOMEBREW_UPDATE_BEFORE#{repo_var}"
|
new_initial_revision_var = "HOMEBREW_UPDATE_BEFORE#{repo_var}"
|
||||||
new_current_revision_var = "HOMEBREW_UPDATE_AFTER#{repo_var}"
|
new_current_revision_var = "HOMEBREW_UPDATE_AFTER#{repo_var}"
|
||||||
|
|
||||||
ENV[new_initial_revision_var] ||= ENV[old_initial_revision_var]
|
ENV[new_initial_revision_var] ||= ENV[old_initial_revision_var]
|
||||||
ENV[new_current_revision_var] ||= ENV[old_current_revision_var]
|
ENV[new_current_revision_var] ||= ENV[old_current_revision_var]
|
||||||
|
|
||||||
return unless old_path.git?
|
|
||||||
|
|
||||||
new_name = name
|
new_name = name
|
||||||
new_path = path
|
new_path = path
|
||||||
new_remote = default_remote
|
new_remote = default_remote
|
||||||
@ -37,6 +34,8 @@ class Tap
|
|||||||
path.dirname.mkpath
|
path.dirname.mkpath
|
||||||
FileUtils.mv old_path, new_path
|
FileUtils.mv old_path, new_path
|
||||||
|
|
||||||
|
return unless old_path.git?
|
||||||
|
|
||||||
puts "Changing remote from #{old_remote} to #{new_remote}..." if $stdout.tty?
|
puts "Changing remote from #{old_remote} to #{new_remote}..." if $stdout.tty?
|
||||||
new_path.git_origin = new_remote
|
new_path.git_origin = new_remote
|
||||||
end
|
end
|
||||||
|
|||||||
@ -84,6 +84,7 @@ class Tap
|
|||||||
# clear internal cache
|
# clear internal cache
|
||||||
def clear_cache
|
def clear_cache
|
||||||
@remote = nil
|
@remote = nil
|
||||||
|
@repo_var = nil
|
||||||
@formula_dir = nil
|
@formula_dir = nil
|
||||||
@cask_dir = nil
|
@cask_dir = nil
|
||||||
@formula_files = nil
|
@formula_files = nil
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user