From 52d8f78fd1c1657f58115adc1928763571ffc7fa Mon Sep 17 00:00:00 2001 From: William Boman Date: Sun, 1 May 2022 15:02:43 +0200 Subject: feat(receipt): add "github_release" type (#650) This is for sources that uses GitHub releases, but doesn't target a specific asset file (as opposed to the github_release_file source). --- lua/nvim-lsp-installer/core/receipt.lua | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'lua/nvim-lsp-installer/core/receipt.lua') diff --git a/lua/nvim-lsp-installer/core/receipt.lua b/lua/nvim-lsp-installer/core/receipt.lua index 21600eae..4517256a 100644 --- a/lua/nvim-lsp-installer/core/receipt.lua +++ b/lua/nvim-lsp-installer/core/receipt.lua @@ -18,6 +18,7 @@ local M = {} ---| '"jdtls"' ---| '"git"' ---| '"github_tag"' +---| '"github_release"' ---| '"github_release_file"' ---@alias InstallReceiptSource {type: InstallReceiptSourceType} @@ -135,27 +136,6 @@ function InstallReceiptBuilder.git_remote(remote_url) return { type = "git", remote = remote_url } end ----@param ctx ServerInstallContext ----@param opts FetchLatestGithubReleaseOpts|nil -function InstallReceiptBuilder.github_release_file(ctx, opts) - opts = opts or {} - return { - type = "github_release_file", - repo = ctx.github_repo, - file = ctx.github_release_file, - release = ctx.requested_server_version, - tag_name_pattern = opts.tag_name_pattern, - } -end - -function InstallReceiptBuilder.github_tag(ctx) - return { - type = "github_tag", - repo = ctx.github_repo, - tag = ctx.requested_server_version, - } -end - ---@class InstallReceipt ---@field public name string ---@field public schema_version InstallReceiptSchemaVersion -- cgit v1.2.3-70-g09d2