-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixctl.rb.in
27 lines (24 loc) · 1.2 KB
/
fixctl.rb.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class Fixctl < Formula
desc "fixctl is a command line tool for searching the Fix Security graph."
homepage "https://fix.security/"
version "@FIXCTL_VERSION@"
license "AGPL-3.0"
if OS.mac?
url "https://github.com/someengineering/fixctl/releases/download/@FIXCTL_VERSION@/fixctl-macos-universal-@FIXCTL_VERSION@"
sha256 "@FIXCTL_MACOS_UNIVERSAL_BINARY_SHA256@"
elsif OS.linux? && Hardware::CPU.intel?
url "https://github.com/someengineering/fixctl/releases/download/@FIXCTL_VERSION@/fixctl-linux-amd64-@FIXCTL_VERSION@"
sha256 "@FIXCTL_LINUX_AMD64_BINARY_SHA256@"
elsif OS.linux? && Hardware::CPU.arm?
url "https://github.com/someengineering/fixctl/releases/download/@FIXCTL_VERSION@/fixctl-linux-arm64-@FIXCTL_VERSION@"
sha256 "@FIXCTL_LINUX_ARM64_BINARY_SHA256@"
end
def install
bin.install "fixctl-macos-universal-#{version}" => "fixctl" if OS.mac?
bin.install "fixctl-linux-amd64-#{version}" => "fixctl" if OS.linux? && Hardware::CPU.intel?
bin.install "fixctl-linux-arm64-#{version}" => "fixctl" if OS.linux? && Hardware::CPU.arm?
end
test do
system "#{bin}/fixctl", "--help"
end
end