File tree 3 files changed +13
-37
lines changed
3 files changed +13
-37
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,20 +5,21 @@ class Coder < Formula
5
5
6
6
if OS . mac?
7
7
if Hardware ::CPU . arm?
8
- url "https://github.com/coder/coder/releases/download/v2.1.4/coder_2.1.4_darwin_arm64 .zip"
8
+ url "https://github.com/coder/coder/releases/download/v #{ version } /coder_ #{ version } _darwin_arm64 .zip"
9
9
sha256 "ac67c032e81fed7ef3b2e1fc5bfafb878e7551c081d0a136f5a88583c279c060"
10
10
else
11
- url "https://github.com/coder/coder/releases/download/v2.1.4/coder_2.1.4_darwin_amd64 .zip"
11
+ url "https://github.com/coder/coder/releases/download/v #{ version } /coder_ #{ version } _darwin_amd64 .zip"
12
12
sha256 "693d6c450891627d879123ea9a08dc5917dafee7de6c639c5c9b496abe6f250b"
13
13
end
14
14
else
15
- url "https://github.com/coder/coder/releases/download/v2.1.4/coder_2.1.4_linux_amd64 .tar.gz"
15
+ url "https://github.com/coder/coder/releases/download/v #{ version } /coder_ #{ version } _linux_amd64 .tar.gz"
16
16
sha256 "41666bbe3afacd153fbe6c1a2d908bb4fb7a88e821205cb7136a0bad2d1cd6dc"
17
17
end
18
18
19
19
def install
20
20
bin . install "coder"
21
21
end
22
+
22
23
test do
23
24
version_output = shell_output ( "#{ bin } /coder version" )
24
25
assert_match version . to_s , version_output
Original file line number Diff line number Diff line change @@ -4,16 +4,23 @@ class CoderAT1 < Formula
4
4
version "1.44.0"
5
5
6
6
if OS . mac?
7
- url "https://github.com/coder/coder-v1-cli/releases/download/v1.44.0 /coder-cli-darwin-amd64.zip"
7
+ url "https://github.com/coder/coder-v1-cli/releases/download/v #{ version } /coder-cli-darwin-amd64.zip"
8
8
sha256 "f3fe13cec4d0615a40134675279d4cd1a5a871356d90dedef020981622f1b693" # mac
9
9
else
10
- url "https://github.com/coder/coder-v1-cli/releases/download/v1.44.0 /coder-cli-linux-amd64.tar.gz"
10
+ url "https://github.com/coder/coder-v1-cli/releases/download/v #{ version } /coder-cli-linux-amd64.tar.gz"
11
11
sha256 "642320e709a8585ae732e3b31d5945a09cd2a7d63121d7121c34ebc5740d3fc9" # linux
12
12
end
13
13
14
+ keg_only :versioned_formula
15
+
16
+ def version_suffix
17
+ version . major . to_s
18
+ end
19
+
14
20
def install
15
21
bin . install "coder"
16
22
end
23
+
17
24
test do
18
25
system "#{ bin } /coder" , "--version"
19
26
end
You can’t perform that action at this time.
0 commit comments