File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ class ClojureLspNative < Formula
3
3
homepage "https://github.com/clojure-lsp/clojure-lsp"
4
4
version "<version>"
5
5
6
+ option "with-static", "Installs statically built binary."
7
+
6
8
if OS.mac?
7
9
if Hardware::CPU.arm?
8
10
url "https://github.com/clojure-lsp/clojure-lsp/releases/download/<version>/clojure-lsp-native-macos-aarch64.zip"
@@ -12,8 +14,13 @@ class ClojureLspNative < Formula
12
14
sha256 "<mac-amd-sha>"
13
15
end
14
16
elsif OS.linux?
15
- url "https://github.com/clojure-lsp/clojure-lsp/releases/download/<version>/clojure-lsp-native-linux-amd64.zip"
16
- sha256 "<linux-sha>"
17
+ if build.with? "static"
18
+ url "https://github.com/clojure-lsp/clojure-lsp/releases/download/<version>/clojure-lsp-native-static-linux-amd64.zip"
19
+ sha256 "<static-linux-sha>"
20
+ else
21
+ url "https://github.com/clojure-lsp/clojure-lsp/releases/download/<version>/clojure-lsp-native-linux-amd64.zip"
22
+ sha256 "<linux-sha>"
23
+ end
17
24
end
18
25
19
26
def install
Original file line number Diff line number Diff line change 13
13
[nil " --linux-sha SHA" " The sha256 of the linux artifact"
14
14
:default " "
15
15
:missing " --linux-sha must be specified" ]
16
+ [nil " --static-linux-sha SHA" " The sha256 of the static linux artifact"
17
+ :default " "
18
+ :missing " --static-linux-sha must be specified" ]
16
19
[nil " --version VERSION" " The new version to publish"
17
20
:default " "
18
21
:missing " --linux-sha must be specified" ]
21
24
22
25
23
26
(defn render
24
- [{:keys [version linux-sha mac-amd-sha mac-arm-sha template]}]
27
+ [{:keys [version linux-sha static-linux-sha mac-amd-sha mac-arm-sha template]}]
25
28
(-> (slurp template)
26
29
(str/replace #"<version>" version)
27
30
(str/replace #"<linux-sha>" linux-sha)
31
+ (str/replace #"<static-linux-sha>" static-linux-sha)
28
32
(str/replace #"<mac-arm-sha>" mac-arm-sha)
29
33
(str/replace #"<mac-amd-sha>" mac-amd-sha)))
30
34
You can’t perform that action at this time.
0 commit comments