aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/opencl_ls/init.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-01-12 22:13:06 +0100
committerWilliam Boman <william@redwill.se>2022-01-12 22:13:10 +0100
commit75f4bb16f1b601d9d9043518e8eb8749a8195071 (patch)
tree74fcbecf89f6ed33b05b0f31b70a4b59c76e9c4f /lua/nvim-lsp-installer/servers/opencl_ls/init.lua
parentui: s/last updated/installed/ (diff)
downloadmason-75f4bb16f1b601d9d9043518e8eb8749a8195071.tar
mason-75f4bb16f1b601d9d9043518e8eb8749a8195071.tar.gz
mason-75f4bb16f1b601d9d9043518e8eb8749a8195071.tar.bz2
mason-75f4bb16f1b601d9d9043518e8eb8749a8195071.tar.lz
mason-75f4bb16f1b601d9d9043518e8eb8749a8195071.tar.xz
mason-75f4bb16f1b601d9d9043518e8eb8749a8195071.tar.zst
mason-75f4bb16f1b601d9d9043518e8eb8749a8195071.zip
fix(opencl_ls): update release asset filenames
The new 0.2 release uses .tar.gz for Unix dist.
Diffstat (limited to 'lua/nvim-lsp-installer/servers/opencl_ls/init.lua')
-rw-r--r--lua/nvim-lsp-installer/servers/opencl_ls/init.lua26
1 files changed, 17 insertions, 9 deletions
diff --git a/lua/nvim-lsp-installer/servers/opencl_ls/init.lua b/lua/nvim-lsp-installer/servers/opencl_ls/init.lua
index 8a0af34f..5586fe6d 100644
--- a/lua/nvim-lsp-installer/servers/opencl_ls/init.lua
+++ b/lua/nvim-lsp-installer/servers/opencl_ls/init.lua
@@ -6,22 +6,30 @@ local context = require "nvim-lsp-installer.installers.context"
local Data = require "nvim-lsp-installer.data"
local coalesce, when = Data.coalesce, Data.when
+
return function(name, root_dir)
- local target = coalesce(
- when(platform.is_mac, "opencl-language-server-darwin-x86_64.zip"),
- when(platform.is_linux, coalesce(when(platform.arch == "x64", "opencl-language-server-linux-x86_64.zip"))),
- when(platform.is_win, coalesce(when(platform.arch == "x64", "opencl-language-server-win32-x86_64.zip")))
- )
return server.Server:new {
name = name,
root_dir = root_dir,
homepage = "https://github.com/Galarius/opencl-language-server",
languages = { "opencl" },
installer = {
- context.use_github_release_file("Galarius/opencl-language-server", target),
- context.capture(function(ctx)
- return std.unzip_remote(ctx.github_release_file)
- end),
+ context.use_github_release_file(
+ "Galarius/opencl-language-server",
+ coalesce(
+ when(platform.is_mac, "opencl-language-server-darwin-x86_64.tar.gz"),
+ when(platform.is_linux and platform.arch == "x64", "opencl-language-server-linux-x86_64.tar.gz"),
+ when(platform.is_win and platform.arch == "x64", "opencl-language-server-win32-x86_64.zip")
+ )
+ ),
+ context.capture(coalesce(
+ when(platform.is_unix, function(ctx)
+ return std.untargz_remote(ctx.github_release_file)
+ end),
+ when(platform.is_win, function(ctx)
+ return std.unzip_remote(ctx.github_release_file)
+ end)
+ )),
context.receipt(function(receipt, ctx)
receipt:with_primary_source(receipt.github_release_file(ctx))
end),