From 07c49a6325479a4fd7424edc17614ab5a0d15611 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 20 Nov 2024 18:07:18 +0100 Subject: [PATCH] Package jj --- repo/jj.ubpkg.sky | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 repo/jj.ubpkg.sky diff --git a/repo/jj.ubpkg.sky b/repo/jj.ubpkg.sky new file mode 100644 index 0000000..eadc171 --- /dev/null +++ b/repo/jj.ubpkg.sky @@ -0,0 +1,22 @@ +gh = github_repo("martinvonz/jj") + +release = gh.latest_release() + +rest = { + ("macos", "aarch64"): "aarch64-apple-darwin", + ("macos", "x86_64"): "x86_64-apple-darwin", + ("linux", "x86_64"): "x86_64-unknown-linux-musl", + ("linux", "aarch64"): "aarch64-unknown-linux-musl", + ("windows", "x86_64"): "x86_64-pc-windows-msvc", +}[(os, arch)] + +archive_format = { + "linux": "tar.gz", + "macos": "tar.gz", + "windows": "zip", +}[os] + + +asset = release.get_asset_url("jj-{version}-{rest}.{archive_format}".format(version=release.name(), rest=rest, archive_format=archive_format)) + +install_binary(extract_from_url(asset, "jj"), "jj")