-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
egctl is a command line tool to provide additional functionality for Envoy Gateway users, add a formula make it easier for brew users to install it.
- Loading branch information
Showing
1 changed file
with
31 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,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
|
||
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 |