-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstarkit.rb
35 lines (31 loc) · 1.11 KB
/
starkit.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
class Starkit < Formula
desc "Starkit CLI for managing cloud resources"
homepage "https://github.com/nonfx/starchitect-cloudguard"
version "1.0.3"
version_scheme 1
on_macos do
on_arm do
url "https://nonfx-public-access.s3.ap-southeast-1.amazonaws.com/versions/1.0.3/e434c98/starkit-v1.0.3-e434c98-darwin-arm64.tar.xz"
sha256 "b3e1a4168cf65f5240e1e239258ca2ed4dda9809a2297fb3d02118daf3a9acfd"
end
on_intel do
url "https://nonfx-public-access.s3.ap-southeast-1.amazonaws.com/versions/1.0.3/e434c98/starkit-v1.0.3-e434c98-darwin-x64.tar.xz"
sha256 "bc2174ac7f21dcfb9d3cc54287668f83ca65027bbdc354478500ceb3b1b86528"
end
end
def install
inreplace "bin/starkit", /^CLIENT_HOME=/, "export STARKIT_OCLIF_CLIENT_HOME=#{lib/"client"}\nCLIENT_HOME="
libexec.install Dir["*"]
bin.install_symlink libexec/"bin/starkit"
end
def caveats
<<~EOS
To update starkit, first create the local config directory:
mkdir -p ~/.local/share/starkit
echo "stable" > ~/.local/share/starkit/channel
EOS
end
test do
system bin/"starkit", "--version"
end
end