From 2a988751ae82992eee658f5288876f36c099fbdf Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 4 Oct 2024 17:25:22 +0200 Subject: [PATCH] Package lazygit --- repo/lazygit.ubpkg.sky | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 repo/lazygit.ubpkg.sky diff --git a/repo/lazygit.ubpkg.sky b/repo/lazygit.ubpkg.sky new file mode 100644 index 0000000..a83d371 --- /dev/null +++ b/repo/lazygit.ubpkg.sky @@ -0,0 +1,26 @@ +gh = github_repo("jesseduffield/lazygit") + +release = gh.latest_release() + +os_str = { + "linux": "Linux", + "macos": "Darwin", + "windows": "Windows", +}[os] + +arch_str = { + "x86_64": "x86_64", + "aarch64": "arm64", +}[arch] + +archive_format = { + "linux": "tar.gz", + "macos": "tar.gz", + "windows": "zip", +}[os] + +version_str = release.name().removeprefix("v") + +asset = release.get_asset_url("lazygit_{version_str}_{os_str}_{arch_str}.{archive_format}".format(version_str=version_str, os_str=os_str, arch_str=arch_str, archive_format=archive_format)) + +install_binary(extract_from_url(asset, "lazygit"), "lazygit")