-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcoder.rb
More file actions
32 lines (28 loc) · 1.19 KB
/
coder.rb
File metadata and controls
32 lines (28 loc) · 1.19 KB
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
class Coder < Formula
desc "Provisions remote development environments via Terraform"
homepage "https://github.com/coder/coder"
version "2.31.4"
if OS.mac?
if Hardware::CPU.arm?
url "https://github.com/coder/coder/releases/download/v#{version}/coder_#{version}_darwin_arm64.zip"
sha256 "42b68a890ed285700c4a1979d0719fc252839dbb34b21c264eef35c949e2f2d2"
else
url "https://github.com/coder/coder/releases/download/v#{version}/coder_#{version}_darwin_amd64.zip"
sha256 "f3b7528a89af7f87c94d232a7886fc09ba8dc5cf3fc48b643314863d72a346f7"
end
else
url "https://github.com/coder/coder/releases/download/v#{version}/coder_#{version}_linux_amd64.tar.gz"
sha256 "f35f09df772b43da5a96792a6a70fc3a13c343c698610e1adb8638d4088c9ea7"
end
def install
bin.install "coder"
end
test do
version_output = shell_output("#{bin}/coder version")
assert_match version.to_s, version_output
refute_match "AGPL", version_output
assert_match "Full build", version_output
assert_match "You are not logged in", shell_output("#{bin}/coder netcheck 2>&1", 1)
assert_match "postgres://", shell_output("#{bin}/coder server postgres-builtin-url")
end
end