Skip to content

Commit 1ef80f1

Browse files
committed
jsctl 0.1.11 (new formula)
* Add jsctl fomula * Correct ruby code Closes #2. Signed-off-by: James Laverack <[email protected]>
1 parent e96379c commit 1ef80f1

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

Formula/jsctl.rb

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
class Jsctl < Formula
2+
desc "CLI tool for Jetstack Secure"
3+
homepage "https://github.com/jetstack/jsctl"
4+
version "0.1.11"
5+
license "Apache-2.0"
6+
head "https://github.com/jetstack/jsctl.git", branch: "main"
7+
8+
on_macos do
9+
on_arm do
10+
url "https://github.com/jetstack/jsctl/releases/download/v#{version}/jsctl-#{version}-darwin-arm64.tar.gz"
11+
sha256 "6e44bdaaabafb1cbe7047557dd50fcaa4eb0994a85cbcec07631f179601f1037"
12+
end
13+
on_intel do
14+
url "https://github.com/jetstack/jsctl/releases/download/v#{version}/jsctl-#{version}-darwin-x86_64.tar.gz"
15+
sha256 "98fd17c91ff7d2315ba3b7c999baed31d60e051d67950f3179b63e5630c903a4"
16+
end
17+
end
18+
on_linux do
19+
on_intel do
20+
url "https://github.com/jetstack/jsctl/releases/download/v#{version}/jsctl-#{version}-linux-x86_64.tar.gz"
21+
sha256 "ad661c32fa5d5845d17fa5b0912d61b35b860d26eb8f6485378d842080aeb47b"
22+
end
23+
end
24+
25+
def install
26+
# The tar we downloaded has the binary already in it just called jsctl
27+
bin.install "jsctl"
28+
# Use the binary to generate shell completions
29+
generate_completions_from_executable(bin/"jsctl", "completion")
30+
end
31+
32+
test do
33+
assert_match version.to_s, shell_output("jsctl version")
34+
end
35+
end

0 commit comments

Comments
 (0)