GHCR: Add constant OS::CI_OS_VERSION
Rename constant OS::GLIBC_CI_VERSION to OS::CI_GLIBC_VERSION.
This commit is contained in:
parent
d4d24ed3be
commit
d6c0bbc7f4
@ -343,7 +343,7 @@ module Homebrew
|
||||
return unless @core_tap
|
||||
|
||||
version = formula.version.to_s
|
||||
return if version == OS::GLIBC_CI_VERSION
|
||||
return if version == OS::CI_GLIBC_VERSION
|
||||
|
||||
problem "The glibc version must be #{version}, as this is the version used by our CI on Linux. " \
|
||||
"Glibc is for users who have a system Glibc with a lower version, " \
|
||||
|
@ -234,13 +234,15 @@ class GitHubPackages
|
||||
end
|
||||
raise TypeError, "unknown tab['built_on']['os']: #{tab["built_on"]["os"]}" if os.blank?
|
||||
|
||||
os_version = tab["built_on"]["os_version"] if tab["built_on"].present?
|
||||
os_version = tab["built_on"]["os_version"].presence if tab["built_on"].present?
|
||||
case os
|
||||
when "darwin"
|
||||
os_version ||= "macOS #{MacOS::Version.from_symbol(bottle_tag)}"
|
||||
when "linux"
|
||||
os_version = (os_version || "Ubuntu 16.04.7").delete_suffix " LTS"
|
||||
glibc_version = (tab["built_on"]["glibc_version"] if tab["built_on"].present?) || OS::GLIBC_CI_VERSION
|
||||
os_version&.delete_suffix!(" LTS")
|
||||
os_version ||= OS::CI_OS_VERSION
|
||||
glibc_version = tab["built_on"]["glibc_version"].presence if tab["built_on"].present?
|
||||
glibc_version ||= OS::CI_GLIBC_VERSION
|
||||
cpu_variant = tab["oldest_cpu_family"] || Hardware::CPU::INTEL_64BIT_OLDEST_CPU.to_s
|
||||
end
|
||||
|
||||
|
@ -37,7 +37,8 @@ module OS
|
||||
|
||||
::OS_VERSION = ENV["HOMEBREW_OS_VERSION"]
|
||||
|
||||
GLIBC_CI_VERSION = "2.23"
|
||||
CI_GLIBC_VERSION = "2.23"
|
||||
CI_OS_VERSION = "Ubuntu 16.04"
|
||||
|
||||
if OS.mac?
|
||||
require "os/mac"
|
||||
|
Loading…
x
Reference in New Issue
Block a user