Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ngwafctl binary to formulae #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions Formula/ngwafctl.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# typed: false
# frozen_string_literal: true

# This file was generated by GoReleaser. DO NOT EDIT.
class Ngwafctl < Formula
desc "A CLI for interacting with the Next-Gen WAF platform"
homepage "https://docs.fastly.com/en/ngwaf/using-the-ngwaf-core-command-line-utility"
version "0.2.0"

on_macos do
if Hardware::CPU.arm?
url "https://dl.signalsciences.net/ngwafctl/0.2.0/ngwafctl_0.2.0_darwin_arm64.tar.gz"
sha256 "4aa73623dd4afc38639ccf1ce8c7ebe1e24e17051a56c2ba7bd4cbb33a64f659"

def install
bin.install "ngwafctl"
(bash_completion/"ngwafctl.sh").write `#{bin}/ngwafctl completion bash`
(zsh_completion/"_ngwafctl").write `#{bin}/ngwafctl completion zsh`
end
end
if Hardware::CPU.intel?
url "https://dl.signalsciences.net/ngwafctl/0.2.0/ngwafctl_0.2.0_darwin_amd64.tar.gz"
sha256 "a5fd08cc09b53ca5e2cb9073f6c041904ecc539336c7d61a69b5ee5d794fdaa3"

def install
bin.install "ngwafctl"
(bash_completion/"ngwafctl.sh").write `#{bin}/ngwafctl completion bash`
(zsh_completion/"_ngwafctl").write `#{bin}/ngwafctl completion zsh`
end
end
end

on_linux do
if Hardware::CPU.intel?
url "https://dl.signalsciences.net/ngwafctl/0.2.0/ngwafctl_0.2.0_linux_amd64.tar.gz"
sha256 "8be19346e23537b8cd5e3414632ea91355b865f0784aba14cb15bd3c2d0f5d6b"

def install
bin.install "ngwafctl"
(bash_completion/"ngwafctl.sh").write `#{bin}/ngwafctl completion bash`
(zsh_completion/"_ngwafctl").write `#{bin}/ngwafctl completion zsh`
end
end
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
url "https://dl.signalsciences.net/ngwafctl/0.2.0/ngwafctl_0.2.0_linux_arm64.tar.gz"
sha256 "e9a4479069e228b034bbffd631de75ed01d091770ed3f64c34a435da5fc898c6"

def install
bin.install "ngwafctl"
(bash_completion/"ngwafctl.sh").write `#{bin}/ngwafctl completion bash`
(zsh_completion/"_ngwafctl").write `#{bin}/ngwafctl completion zsh`
end
end
end

head do
url "https://docs.fastly.com/en/ngwaf/using-the-ngwaf-core-command-line-utility"
depends_on "go"
end

test do
help_text = shell_output("#{bin}/ngwafctl --help")
assert_includes help_text, "Usage:"
end
end
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Homebrew tap
Homebrew tap repository that provides formula for public Fastly binaries, such as the [Fastly CLI](https://github.com/fastly/cli) or [waflyctl](https://github.com/fastly/waflyctl).
Homebrew tap repository that provides formula for public Fastly binaries, such as the [Fastly CLI](https://github.com/fastly/cli), [Next-Gen WAF core command line utility](https://docs.fastly.com/en/ngwaf/using-the-ngwaf-core-command-line-utility), or [waflyctl](https://github.com/fastly/waflyctl).

**Note:** the formulae content of this repository is automatically generated.

Expand All @@ -16,6 +16,12 @@ To install individual formula:
brew install fastly/tap/fastly
```

### Next-Gen WAF core command line utility

```
brew install fastly/tap/ngwafctl
```

### waflyctl
```
brew install fastly/tap/waflyctl
Expand Down