Skip to content

Commit

Permalink
add egctl formula
Browse files Browse the repository at this point in the history
  • Loading branch information
zirain committed Jun 29, 2024
1 parent d767dd1 commit bd7f0fd
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Formula/e/egctl.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
class Egctl < Formula
desc "Command-line utility for operating Envoy Gateway"
homepage "https://gateway.envoyproxy.io/"
url "https://github.com/envoyproxy/gateway/archive/refs/tags/v1.0.2.tar.gz"
sha256 "05406182dc165513925cf60722582613d4de9ea789d60e014e6da456bb229f65"
license "Apache-2.0"
head "https://github.com/envoyproxy/gateway.git", branch: "main"

livecheck do
url :stable
strategy :github_latest
end

depends_on "go" => :build

def install

Check failure on line 16 in Formula/e/egctl.rb

View workflow job for this annotation

GitHub Actions / Linux

`brew install --verbose --formula --build-bottle egctl` failed on Linux!

==> Fetching egctl ==> Downloading https://github.com/envoyproxy/gateway/archive/refs/tags/v1.0.2.tar.gz Already downloaded: /home/linuxbrew/.cache/Homebrew/downloads/d8842df61e0044713f18e31c46df2722fde5a3a057d06b9afc02e037f928e5ab--gateway-1.0.2.tar.gz ==> Verifying checksum for 'd8842df61e0044713f18e31c46df2722fde5a3a057d06b9afc02e037f928e5ab--gateway-1.0.2.tar.gz' /usr/bin/env tar --extract --no-same-owner --file /home/linuxbrew/.cache/Homebrew/downloads/d8842df61e0044713f18e31c46df2722fde5a3a057d06b9afc02e037f928e5ab--gateway-1.0.2.tar.gz --directory /tmp/homebrew-unpack20240629-4156-1mfwco /usr/bin/env cp -pR /tmp/homebrew-unpack20240629-4156-1mfwco/gateway-1.0.2/. /tmp/egctl-20240629-4156-f8x32q/gateway-1.0.2 ==> go build -trimpath -o=/home/linuxbrew/.linuxbrew/Cellar/egctl/1.0.2/bin/egctl -ldflags=-s -w -X github.com/envoyproxy/gateway/internal/cmd/version.envoyGatewayVersion=1.0.2 -X github.com/envoyproxy/gateway/internal/cmd/version.gitCommitID=Homebrew ./cmd/egctl go: downloading github.com/envoyproxy/go-control-plane v0.12.0 go: downloading github.com/spf13/cobra v1.8.0 go: downloading google.golang.org/protobuf v1.33.0 go: downloading k8s.io/api v0.29.2 go: downloading k8s.io/apimachinery v0.29.2 go: downloading k8s.io/kubectl v0.29.2 go: downloading sigs.k8s.io/controller-runtime v0.17.2 go: downloading sigs.k8s.io/gateway-api v1.0.0 go: downloading sigs.k8s.io/yaml v1.4.0 go: downloading github.com/google/go-cmp v0.6.0 go: downloading github.com/spf13/pflag v1.0.5 go: downloading k8s.io/cli-runtime v0.29.2 go: downloading k8s.io/client-go v0.29.2 go: downloading sigs.k8s.io/mcs-api v0.1.0 go: downloading github.com/evanphx/json-patch v5.9.0+incompatible go: downloading k8s.io/apiextensions-apiserver v0.29.2 go: downloading k8s.io/utils v0.0.0-20230726121419-3b25d923346b go: downloading golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb go: downloading github.com/go-logr/logr v1.4.1 go: downloading github.com/pkg/errors v0.9.1 go: downloading github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa go: downloading github.com/envoyproxy/ratelimit v1.4.1-0.20230427142404-e2a87f41d3a7 go: downloading github.com/evanphx/json-patch/v5 v5.9.0 go: downloading github.com/golang/protobuf v1.5.4 go: downloading go.opentelemetry.io/proto/otlp v1.1.0 go: downloading gopkg.in/yaml.v3 v3.0.1 go: downloading github.com/envoyproxy/protoc-gen-validate v1.0.4 go: downloading github.com/gogo/protobuf v1.3.2 go: downloading github.com/google/gofuzz v1.2.0 go: downloading k8s.io/klog/v2 v2.110.1 go: downloading sigs.k8s.io/structured-merge-diff/v4 v4.4.1 go: downloading github.com/google/uuid v1.6.0 go: downloading gopkg.in/inf.v0 v0.9.1 go: downloading k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 go: downloading github.com/go-logr/zapr v1.3.0 go: downloading go.uber.org/zap v1.27.0 go: downloading golang.org/x/sys v0.18.0 go: downloading k8s.io/component-base v0.29.2 go: downloading github.com/gorilla/websocket v1.5.0 go: downloading golang.org/x/net v0.22.0 go: downloading github.com/imdario/mergo v0.3.16 go: downloading golang.org/x/term v0.18.0 go: downloading github.com/census-instrumentation/opencensus-proto v0.4.1 go: downloading sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd go: downloading github.com/json-iterator/go v1.1.12 go: downloading gopkg.in/yaml.v2 v2.4.0 go: downloading google.golang.org/grpc v1.62.1 go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 go: downloading google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 go: downloading github.com/prometheus/client_model v0.6.0 go: downloading github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de go: downloading github.com/moby/term v0.5.0 go: downloading github.com/google/gnostic-models v0.6.8 go: downloading golang.org/x/sync v0.6.0 go: downloading golang.org/x/text v0.14.0 go: downloading sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 go: downloading sigs.k8s.io/kustomize/kya

Check failure on line 16 in Formula/e/egctl.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

`brew install --verbose --formula --build-bottle egctl` failed on macOS Sonoma (14) on Apple Silicon!

==> Fetching dependencies for egctl: go ==> Fetching go ==> Downloading https://ghcr.io/v2/homebrew/core/go/manifests/1.22.4 Already downloaded: /Users/brew/Library/Caches/Homebrew/downloads/9347328c0a0629eb375e3281012193efca6a00ed91be5a069fdc682b19bdd488--go-1.22.4.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/go/blobs/sha256:dfabcce1e527cbc83efb0a900a29cf19258543f826267ab599d981a7bac11511 Already downloaded: /Users/brew/Library/Caches/Homebrew/downloads/d84d33255a1a52b5f33d195cf3f9234afebe4225924df3127b22fc91fe13f2dd--go--1.22.4.arm64_sonoma.bottle.tar.gz ==> Verifying checksum for 'd84d33255a1a52b5f33d195cf3f9234afebe4225924df3127b22fc91fe13f2dd--go--1.22.4.arm64_sonoma.bottle.tar.gz' ==> Fetching egctl ==> Downloading https://github.com/envoyproxy/gateway/archive/refs/tags/v1.0.2.tar.gz Already downloaded: /Users/brew/Library/Caches/Homebrew/downloads/d8842df61e0044713f18e31c46df2722fde5a3a057d06b9afc02e037f928e5ab--gateway-1.0.2.tar.gz ==> Verifying checksum for 'd8842df61e0044713f18e31c46df2722fde5a3a057d06b9afc02e037f928e5ab--gateway-1.0.2.tar.gz' ==> Installing dependencies for egctl: go ==> Installing egctl dependency: go ==> Downloading https://ghcr.io/v2/homebrew/core/go/manifests/1.22.4 Already downloaded: /Users/brew/Library/Caches/Homebrew/downloads/9347328c0a0629eb375e3281012193efca6a00ed91be5a069fdc682b19bdd488--go-1.22.4.bottle_manifest.json ==> Pouring go--1.22.4.arm64_sonoma.bottle.tar.gz /usr/bin/env tar --extract --no-same-owner --file /Users/brew/Library/Caches/Homebrew/downloads/d84d33255a1a52b5f33d195cf3f9234afebe4225924df3127b22fc91fe13f2dd--go--1.22.4.arm64_sonoma.bottle.tar.gz --directory /private/tmp/homebrew-unpack20240629-4189-3ndx4h /usr/bin/env cp -pR /private/tmp/homebrew-unpack20240629-4189-3ndx4h/go/. /opt/homebrew/Cellar/go ==> Finishing up ln -s ../Cellar/go/1.22.4/bin/go go ln -s ../Cellar/go/1.22.4/bin/gofmt gofmt ==> Summary /opt/homebrew/Cellar/go/1.22.4: 12,859 files, 250.8MB ==> Installing egctl /usr/bin/env tar --extract --no-same-owner --file /Users/brew/Library/Caches/Homebrew/downloads/d8842df61e0044713f18e31c46df2722fde5a3a057d06b9afc02e037f928e5ab--gateway-1.0.2.tar.gz --directory /private/tmp/homebrew-unpack20240629-4510-84nj6x /usr/bin/env cp -pR /private/tmp/homebrew-unpack20240629-4510-84nj6x/gateway-1.0.2/. /private/tmp/egctl-20240629-4510-flfrzw/gateway-1.0.2 ==> go build -trimpath -o=/opt/homebrew/Cellar/egctl/1.0.2/bin/egctl -ldflags=-s -w -X github.com/envoyproxy/gateway/internal/cmd/version.envoyGatewayVersion=1.0.2 -X github.com/envoyproxy/gateway/internal/cmd/version.gitCommitID=Homebrew ./cmd/egctl go: downloading github.com/envoyproxy/go-control-plane v0.12.0 go: downloading github.com/spf13/cobra v1.8.0 go: downloading google.golang.org/protobuf v1.33.0 go: downloading k8s.io/api v0.29.2 go: downloading k8s.io/apimachinery v0.29.2 go: downloading k8s.io/kubectl v0.29.2 go: downloading sigs.k8s.io/controller-runtime v0.17.2 go: downloading sigs.k8s.io/gateway-api v1.0.0 go: downloading sigs.k8s.io/yaml v1.4.0 go: downloading github.com/google/go-cmp v0.6.0 go: downloading github.com/spf13/pflag v1.0.5 go: downloading k8s.io/cli-runtime v0.29.2 go: downloading k8s.io/client-go v0.29.2 go: downloading sigs.k8s.io/mcs-api v0.1.0 go: downloading golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb go: downloading k8s.io/utils v0.0.0-20230726121419-3b25d923346b go: downloading github.com/evanphx/json-patch v5.9.0+incompatible go: downloading k8s.io/apiextensions-apiserver v0.29.2 go: downloading github.com/go-logr/logr v1.4.1 go: downloading github.com/pkg/errors v0.9.1 go: downloading github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa go: downloading github.com/envoyproxy/ratelimit v1.4.1-0.20230427142404-e2a87f41d3a7 go: downloading github.com/evanphx/json-patch/v5 v5.9.0 go: downloading github.com/golang/protobuf v1.5.4 go: downloading go.opentelemetry.io/proto/otlp v1.1.0 go: downloading gopkg.in/yaml.v3 v3.0.1 go: downloading github.com/envoyproxy/protoc-gen-validate v1.0.4 go: downloading github.com

Check failure on line 16 in Formula/e/egctl.rb

View workflow job for this annotation

GitHub Actions / macOS 12-arm64

`brew install --verbose --formula --build-bottle egctl` failed on macOS Monterey (12) on Apple Silicon!

==> Fetching dependencies for egctl: go ==> Fetching go ==> Downloading https://ghcr.io/v2/homebrew/core/go/manifests/1.22.4 Already downloaded: /Users/brew/Library/Caches/Homebrew/downloads/9347328c0a0629eb375e3281012193efca6a00ed91be5a069fdc682b19bdd488--go-1.22.4.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/go/blobs/sha256:713c8907b0227f00b07edafa549b09cb390c2a9e7a5a9a9b19d301b282c592fa Already downloaded: /Users/brew/Library/Caches/Homebrew/downloads/7b3d9724f2d07df35bd015ad1e80a29060b2522b4cde5ed8b264fdf707f6b266--go--1.22.4.arm64_monterey.bottle.tar.gz ==> Verifying checksum for '7b3d9724f2d07df35bd015ad1e80a29060b2522b4cde5ed8b264fdf707f6b266--go--1.22.4.arm64_monterey.bottle.tar.gz' ==> Fetching egctl ==> Downloading https://github.com/envoyproxy/gateway/archive/refs/tags/v1.0.2.tar.gz Already downloaded: /Users/brew/Library/Caches/Homebrew/downloads/d8842df61e0044713f18e31c46df2722fde5a3a057d06b9afc02e037f928e5ab--gateway-1.0.2.tar.gz ==> Verifying checksum for 'd8842df61e0044713f18e31c46df2722fde5a3a057d06b9afc02e037f928e5ab--gateway-1.0.2.tar.gz' ==> Installing dependencies for egctl: go ==> Installing egctl dependency: go ==> Downloading https://ghcr.io/v2/homebrew/core/go/manifests/1.22.4 Already downloaded: /Users/brew/Library/Caches/Homebrew/downloads/9347328c0a0629eb375e3281012193efca6a00ed91be5a069fdc682b19bdd488--go-1.22.4.bottle_manifest.json ==> Pouring go--1.22.4.arm64_monterey.bottle.tar.gz /usr/bin/env tar --extract --no-same-owner --file /Users/brew/Library/Caches/Homebrew/downloads/7b3d9724f2d07df35bd015ad1e80a29060b2522b4cde5ed8b264fdf707f6b266--go--1.22.4.arm64_monterey.bottle.tar.gz --directory /private/tmp/homebrew-unpack20240629-3941-q974t /usr/bin/env cp -pR /private/tmp/homebrew-unpack20240629-3941-q974t/go/. /opt/homebrew/Cellar/go ==> Finishing up ln -s ../Cellar/go/1.22.4/bin/go go ln -s ../Cellar/go/1.22.4/bin/gofmt gofmt ==> Summary /opt/homebrew/Cellar/go/1.22.4: 12,859 files, 250.8MB ==> Installing egctl /usr/bin/env tar --extract --no-same-owner --file /Users/brew/Library/Caches/Homebrew/downloads/d8842df61e0044713f18e31c46df2722fde5a3a057d06b9afc02e037f928e5ab--gateway-1.0.2.tar.gz --directory /private/tmp/homebrew-unpack20240629-4260-oxa2pr /usr/bin/env cp -pR /private/tmp/homebrew-unpack20240629-4260-oxa2pr/gateway-1.0.2/. /private/tmp/egctl-20240629-4260-d8kjox/gateway-1.0.2 ==> go build -trimpath -o=/opt/homebrew/Cellar/egctl/1.0.2/bin/egctl -ldflags=-s -w -X github.com/envoyproxy/gateway/internal/cmd/version.envoyGatewayVersion=1.0.2 -X github.com/envoyproxy/gateway/internal/cmd/version.gitCommitID=Homebrew ./cmd/egctl go: downloading github.com/envoyproxy/go-control-plane v0.12.0 go: downloading github.com/spf13/cobra v1.8.0 go: downloading google.golang.org/protobuf v1.33.0 go: downloading k8s.io/api v0.29.2 go: downloading k8s.io/apimachinery v0.29.2 go: downloading k8s.io/kubectl v0.29.2 go: downloading sigs.k8s.io/controller-runtime v0.17.2 go: downloading sigs.k8s.io/gateway-api v1.0.0 go: downloading sigs.k8s.io/yaml v1.4.0 go: downloading github.com/google/go-cmp v0.6.0 go: downloading github.com/spf13/pflag v1.0.5 go: downloading k8s.io/cli-runtime v0.29.2 go: downloading k8s.io/client-go v0.29.2 go: downloading sigs.k8s.io/mcs-api v0.1.0 go: downloading github.com/evanphx/json-patch v5.9.0+incompatible go: downloading k8s.io/apiextensions-apiserver v0.29.2 go: downloading k8s.io/utils v0.0.0-20230726121419-3b25d923346b go: downloading golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb go: downloading github.com/go-logr/logr v1.4.1 go: downloading github.com/pkg/errors v0.9.1 go: downloading github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa go: downloading github.com/envoyproxy/ratelimit v1.4.1-0.20230427142404-e2a87f41d3a7 go: downloading github.com/evanphx/json-patch/v5 v5.9.0 go: downloading github.com/golang/protobuf v1.5.4 go: downloading go.opentelemetry.io/proto/otlp v1.1.0 go: downloading gopkg.in/yaml.v3 v3.0.1 go: downloading github.com/envoyproxy/protoc-gen-validate v1.0.4 go: downloading gith
ldflags = %W[
-s -w
-X github.com/envoyproxy/gateway/internal/cmd/version.envoyGatewayVersion=#{version}
-X github.com/envoyproxy/gateway/internal/cmd/version.gitCommitID=#{tap.user}
]
system "go", "build", *std_go_args(ldflags:), "./cmd/egctl"

generate_completions_from_executable(bin/"egctl", "~")
end

test do
output = shell_output("#{bin}/egctl version --remote=false")
assert_equal "envd: v#{version}", output.strip
end
end

0 comments on commit bd7f0fd

Please sign in to comment.