Skip to content
Snippets Groups Projects
Commit b338398a authored by Bo Anderson's avatar Bo Anderson
Browse files

tab: add built_on & arch information

parent c61427db
No related branches found
No related tags found
No related merge requests found
......@@ -99,6 +99,15 @@ class DevelopmentTools
def subversion_handles_most_https_certificates?
true
end
def build_system_info
{
"os" => ENV["HOMEBREW_SYSTEM"],
"os_version" => OS_VERSION,
"cpu_family" => Hardware::CPU.family,
}
end
alias generic_build_system_info build_system_info
end
end
......
......@@ -56,5 +56,13 @@ class DevelopmentTools
brew install gcc
EOS
end
def build_system_info
build_info = {
"xcode" => MacOS::Xcode.version.to_s.presence,
"clt" => MacOS::CLT.version.to_s.presence,
}
generic_build_system_info.merge build_info
end
end
end
......@@ -36,6 +36,7 @@ class Tab < OpenStruct
"stdlib" => stdlib,
"aliases" => formula.aliases,
"runtime_dependencies" => Tab.runtime_deps_hash(runtime_deps),
"arch" => Hardware::CPU.arch,
"source" => {
"path" => formula.specified_path.to_s,
"tap" => formula.tap&.name,
......@@ -47,6 +48,7 @@ class Tab < OpenStruct
"version_scheme" => formula.version_scheme,
},
},
"built_on" => DevelopmentTools.build_system_info,
}
new(attributes)
......@@ -198,6 +200,7 @@ class Tab < OpenStruct
"version_scheme" => 0,
},
},
"built_on" => DevelopmentTools.generic_build_system_info,
}
new(attributes)
......@@ -344,6 +347,7 @@ class Tab < OpenStruct
"aliases" => aliases,
"runtime_dependencies" => runtime_dependencies,
"source" => source,
"built_on" => built_on,
}
JSON.generate(attributes, options)
......
......@@ -120,7 +120,7 @@ describe Caveats do
"plist_test.plist"
end
end
allow(ENV).to receive(:[]).with("TMUX").and_return(true)
ENV["TMUX"] = "1"
allow(Homebrew).to receive(:_system).with("/usr/bin/pbpaste").and_return(false)
caveats = described_class.new(f).caveats
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment