Implement changes
This commit is contained in:
parent
204f370491
commit
fe5c885da0
@ -785,6 +785,19 @@ module Homebrew
|
|||||||
git -C "#{coretap_path}" remote set-url origin #{Formatter.url("https://github.com/Homebrew/homebrew-core.git")}
|
git -C "#{coretap_path}" remote set-url origin #{Formatter.url("https://github.com/Homebrew/homebrew-core.git")}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return if ENV["CI"] || ENV["JENKINS_HOME"]
|
||||||
|
|
||||||
|
branch = coretap_path.git_branch
|
||||||
|
return if branch.nil? || branch =~ %r{master}
|
||||||
|
|
||||||
|
|
||||||
|
<<-EOS.undent
|
||||||
|
Homebrew/homebrew-core is not on the master branch
|
||||||
|
|
||||||
|
Check out the master branch by running:
|
||||||
|
git -C "$(brew --repo homebrew/core)" checkout master
|
||||||
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
def __check_linked_brew(f)
|
def __check_linked_brew(f)
|
||||||
|
@ -36,6 +36,15 @@ module GitRepositoryExtension
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def git_branch
|
||||||
|
return unless git? && Utils.git_available?
|
||||||
|
cd do
|
||||||
|
Utils.popen_read(
|
||||||
|
"git", "rev-parse", "--abbrev-ref", "HEAD"
|
||||||
|
).chuzzle
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def git_last_commit_date
|
def git_last_commit_date
|
||||||
return unless git? && Utils.git_available?
|
return unless git? && Utils.git_available?
|
||||||
cd do
|
cd do
|
||||||
|
@ -118,6 +118,12 @@ class Tap
|
|||||||
path.git?
|
path.git?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# git branch for this {Tap}.
|
||||||
|
def git_branch
|
||||||
|
raise TapUnavailableError, name unless installed?
|
||||||
|
path.git_branch
|
||||||
|
end
|
||||||
|
|
||||||
# git HEAD for this {Tap}.
|
# git HEAD for this {Tap}.
|
||||||
def git_head
|
def git_head
|
||||||
raise TapUnavailableError, name unless installed?
|
raise TapUnavailableError, name unless installed?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user