Merge remote-tracking branch 'origin/master' into ww/update-resources-handle-non-pypi-urls
This commit is contained in:
commit
6ec9575c2a
@ -52,7 +52,7 @@ module Homebrew
|
|||||||
old_bin ||= begin
|
old_bin ||= begin
|
||||||
Formula[old_pg_name]
|
Formula[old_pg_name]
|
||||||
ohai "brew install #{old_pg_name}"
|
ohai "brew install #{old_pg_name}"
|
||||||
system "brew", "install", old_pg_name
|
system HOMEBREW_BREW_FILE, "install", old_pg_name
|
||||||
Pathname.glob(old_pg_glob).first
|
Pathname.glob(old_pg_glob).first
|
||||||
rescue FormulaUnavailableError
|
rescue FormulaUnavailableError
|
||||||
nil
|
nil
|
||||||
@ -69,11 +69,11 @@ module Homebrew
|
|||||||
# Following instructions from:
|
# Following instructions from:
|
||||||
# https://www.postgresql.org/docs/10/static/pgupgrade.html
|
# https://www.postgresql.org/docs/10/static/pgupgrade.html
|
||||||
ohai "Upgrading #{name} data from #{pg_version_data} to #{pg_version_installed}..."
|
ohai "Upgrading #{name} data from #{pg_version_data} to #{pg_version_installed}..."
|
||||||
services_json_output = Utils.popen_read("brew", "services", "info", "--all", "--json")
|
services_json_output = Utils.popen_read(HOMEBREW_BREW_FILE, "services", "info", "--all", "--json")
|
||||||
services_json = JSON.parse(services_json_output)
|
services_json = JSON.parse(services_json_output)
|
||||||
loaded_service_names = services_json.select { |sj| sj[:loaded] }.map { |sj| sj[:name] }
|
loaded_service_names = services_json.select { |sj| sj[:loaded] }.map { |sj| sj[:name] }
|
||||||
if loaded_service_names.include?(name)
|
if loaded_service_names.include?(name)
|
||||||
system "brew", "services", "stop", name
|
system HOMEBREW_BREW_FILE, "services", "stop", name
|
||||||
service_stopped = true
|
service_stopped = true
|
||||||
elsif quiet_system "#{bin}/pg_ctl", "-D", datadir, "status"
|
elsif quiet_system "#{bin}/pg_ctl", "-D", datadir, "status"
|
||||||
system "#{bin}/pg_ctl", "-D", datadir, "stop"
|
system "#{bin}/pg_ctl", "-D", datadir, "stop"
|
||||||
@ -81,7 +81,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Shut down old server if it is up via brew services
|
# Shut down old server if it is up via brew services
|
||||||
system "brew", "services", "stop", old_pg_name if loaded_service_names.include?(old_pg_name)
|
system HOMEBREW_BREW_FILE, "services", "stop", old_pg_name if loaded_service_names.include?(old_pg_name)
|
||||||
|
|
||||||
# get 'lc_collate' from old DB"
|
# get 'lc_collate' from old DB"
|
||||||
unless quiet_system "#{old_bin}/pg_ctl", "-w", "-D", datadir, "status"
|
unless quiet_system "#{old_bin}/pg_ctl", "-w", "-D", datadir, "status"
|
||||||
@ -143,7 +143,7 @@ module Homebrew
|
|||||||
if server_stopped
|
if server_stopped
|
||||||
safe_system "#{bin}/pg_ctl", "-D", datadir, "start"
|
safe_system "#{bin}/pg_ctl", "-D", datadir, "start"
|
||||||
elsif service_stopped
|
elsif service_stopped
|
||||||
safe_system "brew", "services", "start", name
|
safe_system HOMEBREW_BREW_FILE, "services", "start", name
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
onoe "Upgrading #{name} data from #{pg_version_data} to #{pg_version_installed} failed!"
|
onoe "Upgrading #{name} data from #{pg_version_data} to #{pg_version_installed} failed!"
|
||||||
@ -158,7 +158,7 @@ module Homebrew
|
|||||||
if server_stopped
|
if server_stopped
|
||||||
system "#{bin}/pg_ctl", "-D", datadir, "start"
|
system "#{bin}/pg_ctl", "-D", datadir, "start"
|
||||||
elsif service_stopped
|
elsif service_stopped
|
||||||
system "brew", "services", "start", name
|
system HOMEBREW_BREW_FILE, "services", "start", name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -86,6 +86,7 @@ module Superenv
|
|||||||
self["HOMEBREW_LIBRARY_PATHS"] = determine_library_paths
|
self["HOMEBREW_LIBRARY_PATHS"] = determine_library_paths
|
||||||
self["HOMEBREW_DEPENDENCIES"] = determine_dependencies
|
self["HOMEBREW_DEPENDENCIES"] = determine_dependencies
|
||||||
self["HOMEBREW_FORMULA_PREFIX"] = @formula.prefix unless @formula.nil?
|
self["HOMEBREW_FORMULA_PREFIX"] = @formula.prefix unless @formula.nil?
|
||||||
|
self["OPENSSL_NO_VENDOR"] = "1"
|
||||||
|
|
||||||
set_debug_symbols if debug_symbols
|
set_debug_symbols if debug_symbols
|
||||||
|
|
||||||
|
|||||||
@ -57,16 +57,18 @@ describe GitHub do
|
|||||||
it "fails to find artifacts that don't exist" do
|
it "fails to find artifacts that don't exist" do
|
||||||
expect do
|
expect do
|
||||||
described_class.get_artifact_url(
|
described_class.get_artifact_url(
|
||||||
described_class.get_workflow_run("Homebrew", "homebrew-core", "79751", artifact_name: "false_bottles"),
|
described_class.get_workflow_run("Homebrew", "homebrew-core", "135608",
|
||||||
|
workflow_id: "triage.yml", artifact_name: "false_artifact"),
|
||||||
)
|
)
|
||||||
end.to raise_error(/No artifact .+ was found/)
|
end.to raise_error(/No artifact .+ was found/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "gets an artifact link" do
|
it "gets an artifact link" do
|
||||||
url = described_class.get_artifact_url(
|
url = described_class.get_artifact_url(
|
||||||
described_class.get_workflow_run("Homebrew", "homebrew-core", "79751", artifact_name: "bottles"),
|
described_class.get_workflow_run("Homebrew", "homebrew-core", "135608",
|
||||||
|
workflow_id: "triage.yml", artifact_name: "event_payload"),
|
||||||
)
|
)
|
||||||
expect(url).to eq("https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/70494047/zip")
|
expect(url).to eq("https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/781984175/zip")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user