|
| 1 | +# typed: false |
| 2 | +# frozen_string_literal: true |
| 3 | + |
| 4 | +# This file was generated by GoReleaser. DO NOT EDIT. |
| 5 | +class SpicedbAT1301 < Formula |
| 6 | + desc "SpiceDB is a Zanzibar-inspired database that stores, computes, and validates application permissions." |
| 7 | + homepage "https://authzed.com/" |
| 8 | + version "1.30.1" |
| 9 | + license "Apache-2.0" |
| 10 | + |
| 11 | + depends_on "go" => :build |
| 12 | + |
| 13 | + on_macos do |
| 14 | + if Hardware::CPU.intel? |
| 15 | + url "https://github.com/authzed/spicedb/releases/download/v1.30.1/spicedb_1.30.1_darwin_amd64.tar.gz", using: CurlDownloadStrategy |
| 16 | + sha256 "09ce624158dc4a3c3c0a39e346f8d3b5e05dab9eff1b1ed58fe69546df52be8e" |
| 17 | + |
| 18 | + def install |
| 19 | + if !File.exists? "spicedb" |
| 20 | + system "go build --ldflags \"-s -w -X github.com/jzelinskie/cobrautil/v2.Version=$(git describe --always --abbrev=7 --dirty --tags)\" ./cmd/spicedb" |
| 21 | + end |
| 22 | + bin.install "spicedb" |
| 23 | + (bash_completion/"spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "bash") |
| 24 | + (zsh_completion/"_spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "zsh") |
| 25 | + (fish_completion/"spicedb.fish").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "fish") |
| 26 | + end |
| 27 | + end |
| 28 | + if Hardware::CPU.arm? |
| 29 | + url "https://github.com/authzed/spicedb/releases/download/v1.30.1/spicedb_1.30.1_darwin_arm64.tar.gz", using: CurlDownloadStrategy |
| 30 | + sha256 "0d46233a705e16c0ba99b4979ca5428a1c6f1fe01d8554029a0579733224473b" |
| 31 | + |
| 32 | + def install |
| 33 | + if !File.exists? "spicedb" |
| 34 | + system "go build --ldflags \"-s -w -X github.com/jzelinskie/cobrautil/v2.Version=$(git describe --always --abbrev=7 --dirty --tags)\" ./cmd/spicedb" |
| 35 | + end |
| 36 | + bin.install "spicedb" |
| 37 | + (bash_completion/"spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "bash") |
| 38 | + (zsh_completion/"_spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "zsh") |
| 39 | + (fish_completion/"spicedb.fish").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "fish") |
| 40 | + end |
| 41 | + end |
| 42 | + end |
| 43 | + |
| 44 | + on_linux do |
| 45 | + if Hardware::CPU.intel? |
| 46 | + url "https://github.com/authzed/spicedb/releases/download/v1.30.1/spicedb_1.30.1_linux_amd64.tar.gz", using: CurlDownloadStrategy |
| 47 | + sha256 "e64f2d9cf3c9343120f791b50d06ba99903e4a30e1cd0680c671f1275deb1f2d" |
| 48 | + |
| 49 | + def install |
| 50 | + if !File.exists? "spicedb" |
| 51 | + system "go build --ldflags \"-s -w -X github.com/jzelinskie/cobrautil/v2.Version=$(git describe --always --abbrev=7 --dirty --tags)\" ./cmd/spicedb" |
| 52 | + end |
| 53 | + bin.install "spicedb" |
| 54 | + (bash_completion/"spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "bash") |
| 55 | + (zsh_completion/"_spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "zsh") |
| 56 | + (fish_completion/"spicedb.fish").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "fish") |
| 57 | + end |
| 58 | + end |
| 59 | + if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? |
| 60 | + url "https://github.com/authzed/spicedb/releases/download/v1.30.1/spicedb_1.30.1_linux_arm64.tar.gz", using: CurlDownloadStrategy |
| 61 | + sha256 "cef89652a82c50998adce0c6827ba3aab242b9b540605f2e4e358603fc3ade5e" |
| 62 | + |
| 63 | + def install |
| 64 | + if !File.exists? "spicedb" |
| 65 | + system "go build --ldflags \"-s -w -X github.com/jzelinskie/cobrautil/v2.Version=$(git describe --always --abbrev=7 --dirty --tags)\" ./cmd/spicedb" |
| 66 | + end |
| 67 | + bin.install "spicedb" |
| 68 | + (bash_completion/"spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "bash") |
| 69 | + (zsh_completion/"_spicedb").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "zsh") |
| 70 | + (fish_completion/"spicedb.fish").write Utils.safe_popen_read("#{bin}/spicedb", "completion", "fish") |
| 71 | + end |
| 72 | + end |
| 73 | + end |
| 74 | + |
| 75 | + head "https://github.com/authzed/spicedb.git", :branch => "main" |
| 76 | + |
| 77 | + test do |
| 78 | + system "#{bin}/spicedb version" |
| 79 | + end |
| 80 | +end |
0 commit comments