-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Brew formula update for spicedb version v1.31.0
- Loading branch information
1 parent
4cddf5c
commit abfa4ba
Showing
1 changed file
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# typed: false | ||
# frozen_string_literal: true | ||
|
||
# This file was generated by GoReleaser. DO NOT EDIT. | ||
class SpicedbAT1310 < Formula | ||
desc "SpiceDB is a Zanzibar-inspired database that stores, computes, and validates application permissions." | ||
homepage "https://authzed.com/" | ||
version "1.31.0" | ||
license "Apache-2.0" | ||
|
||
depends_on "go" => :build | ||
|
||
on_macos do | ||
if Hardware::CPU.intel? | ||
url "https://github.com/authzed/spicedb/releases/download/v1.31.0/spicedb_1.31.0_darwin_amd64.tar.gz", using: CurlDownloadStrategy | ||
sha256 "87c18d84775acc2a938852b12276bdf6bdfebfe725d98d5b082473e98c06346b" | ||
|
||
def install | ||
if !File.exists? "spicedb" | ||
system "go build --ldflags \"-s -w -X github.com/jzelinskie/cobrautil/v2.Version=$(git describe --always --abbrev=7 --dirty --tags)\" ./cmd/spicedb" | ||
end | ||
bin.install "spicedb" | ||
(bash_completion/"spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "bash") | ||
(zsh_completion/"_spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "zsh") | ||
(fish_completion/"spicedb.fish").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "fish") | ||
end | ||
end | ||
if Hardware::CPU.arm? | ||
url "https://github.com/authzed/spicedb/releases/download/v1.31.0/spicedb_1.31.0_darwin_arm64.tar.gz", using: CurlDownloadStrategy | ||
sha256 "d510018185083c3a749f88d8c8a8d97be6858ef8788999a7d9bb40aa666595d0" | ||
|
||
def install | ||
if !File.exists? "spicedb" | ||
system "go build --ldflags \"-s -w -X github.com/jzelinskie/cobrautil/v2.Version=$(git describe --always --abbrev=7 --dirty --tags)\" ./cmd/spicedb" | ||
end | ||
bin.install "spicedb" | ||
(bash_completion/"spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "bash") | ||
(zsh_completion/"_spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "zsh") | ||
(fish_completion/"spicedb.fish").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "fish") | ||
end | ||
end | ||
end | ||
|
||
on_linux do | ||
if Hardware::CPU.intel? | ||
url "https://github.com/authzed/spicedb/releases/download/v1.31.0/spicedb_1.31.0_linux_amd64.tar.gz", using: CurlDownloadStrategy | ||
sha256 "4a004c87dc47d825c9f9b9d9ff3449f829b5d9d4371299b02b6aabb2c1126bbe" | ||
|
||
def install | ||
if !File.exists? "spicedb" | ||
system "go build --ldflags \"-s -w -X github.com/jzelinskie/cobrautil/v2.Version=$(git describe --always --abbrev=7 --dirty --tags)\" ./cmd/spicedb" | ||
end | ||
bin.install "spicedb" | ||
(bash_completion/"spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "bash") | ||
(zsh_completion/"_spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "zsh") | ||
(fish_completion/"spicedb.fish").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "fish") | ||
end | ||
end | ||
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? | ||
url "https://github.com/authzed/spicedb/releases/download/v1.31.0/spicedb_1.31.0_linux_arm64.tar.gz", using: CurlDownloadStrategy | ||
sha256 "6f06882b60d56ba90c123cad4539b7b962c2f05c05f6b0a2f0b4220f6d96a464" | ||
|
||
def install | ||
if !File.exists? "spicedb" | ||
system "go build --ldflags \"-s -w -X github.com/jzelinskie/cobrautil/v2.Version=$(git describe --always --abbrev=7 --dirty --tags)\" ./cmd/spicedb" | ||
end | ||
bin.install "spicedb" | ||
(bash_completion/"spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "bash") | ||
(zsh_completion/"_spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "zsh") | ||
(fish_completion/"spicedb.fish").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "fish") | ||
end | ||
end | ||
end | ||
|
||
head "https://github.com/authzed/spicedb.git", :branch => "main" | ||
|
||
test do | ||
system "#{bin}/spicedb version" | ||
end | ||
end |