diff options
| author | William Boman <william@redwill.se> | 2023-02-20 22:19:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-20 22:19:39 +0100 |
| commit | b8a6632a0f2d263199d5d480ca85477fe0f414ab (patch) | |
| tree | 57e1ee0f3cef078ec144ecdf1b2fa861acf47755 /lua/mason-registry/actionlint/init.lua | |
| parent | chore: autogenerate (#1015) (diff) | |
| download | mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.tar mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.tar.gz mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.tar.bz2 mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.tar.lz mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.tar.xz mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.tar.zst mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.zip | |
feat: configurable registries (#1016)
Diffstat (limited to 'lua/mason-registry/actionlint/init.lua')
| -rw-r--r-- | lua/mason-registry/actionlint/init.lua | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/lua/mason-registry/actionlint/init.lua b/lua/mason-registry/actionlint/init.lua deleted file mode 100644 index 4d6e71bb..00000000 --- a/lua/mason-registry/actionlint/init.lua +++ /dev/null @@ -1,55 +0,0 @@ -local Pkg = require "mason-core.package" -local platform = require "mason-core.platform" -local _ = require "mason-core.functional" -local github = require "mason-core.managers.github" -local std = require "mason-core.managers.std" - -local coalesce, when = _.coalesce, _.when - -return Pkg.new { - name = "actionlint", - desc = [[Static checker for GitHub Actions workflow files]], - homepage = "https://github.com/rhysd/actionlint", - languages = { Pkg.Lang.YAML }, - categories = { Pkg.Cat.Linter }, - ---@async - ---@param ctx InstallContext - install = function(ctx) - local repo = "rhysd/actionlint" - local function format_release_file(file) - return _.compose(_.format(file), _.gsub("^v", "")) - end - - platform.when { - unix = function() - github - .untargz_release_file({ - repo = repo, - asset_file = coalesce( - when(platform.is.mac_x64, format_release_file "actionlint_%s_darwin_amd64.tar.gz"), - when(platform.is.mac_arm64, format_release_file "actionlint_%s_darwin_arm64.tar.gz"), - when(platform.is.linux_x64, format_release_file "actionlint_%s_linux_amd64.tar.gz"), - when(platform.is.linux_arm, format_release_file "actionlint_%s_linux_armv6.tar.gz"), - when(platform.is.linux_arm64, format_release_file "actionlint_%s_linux_arm64.tar.gz"), - when(platform.is.linux_x86, format_release_file "actionlint_%s_linux_386.tar.gz") - ), - }) - .with_receipt() - std.chmod("+x", { "actionlint" }) - end, - win = function() - github - .unzip_release_file({ - repo = repo, - asset_file = coalesce( - when(platform.is.win_arm64, format_release_file "actionlint_%s_windows_arm64.zip"), - when(platform.is.win_x64, format_release_file "actionlint_%s_windows_amd64.zip"), - when(platform.is.win_x86, format_release_file "actionlint_%s_windows_386.zip") - ), - }) - .with_receipt() - end, - } - ctx:link_bin("actionlint", platform.is.win and "actionlint.exe" or "actionlint") - end, -} |
