diff --git a/Cargo.lock b/Cargo.lock index 9b46637..00489dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -525,6 +525,7 @@ dependencies = [ "regex", "tar", "thiserror", + "xz", "zip", ] @@ -1108,6 +1109,17 @@ dependencies = [ "url", ] +[[package]] +name = "lzma-sys" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "maplit" version = "1.0.2" @@ -2365,6 +2377,24 @@ dependencies = [ "rustix", ] +[[package]] +name = "xz" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c887690ff2a2e233e8e49633461521f98ec57fbff9d59a884c9a4f04ec1da34" +dependencies = [ + "xz2", +] + +[[package]] +name = "xz2" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2" +dependencies = [ + "lzma-sys", +] + [[package]] name = "zerocopy" version = "0.7.35" diff --git a/Cargo.toml b/Cargo.toml index 370b66d..cd8a827 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ allocative = "0.3.3" anyhow = "1.0.89" clap = { version = "4.5.20", features = ["derive"] } color-eyre = "0.6.3" -decompress = { version = "0.6.0", default-features = false, features = ["targz", "zip", "gz"] } +decompress = { version = "0.6.0", default-features = false, features = ["targz", "zip", "gz", "tarxz"] } directories = "5.0.1" include_dir = "0.7.4" regex = "1.10.6" diff --git a/repo/probe-rs-tools.ubpkg.sky b/repo/probe-rs-tools.ubpkg.sky new file mode 100644 index 0000000..650009b --- /dev/null +++ b/repo/probe-rs-tools.ubpkg.sky @@ -0,0 +1,23 @@ +gh = github_repo("probe-rs/probe-rs") + +release = gh.latest_release() + +os_str = { + "linux": "unknown-linux-gnu", + "macos": "apple-darwin", + "windows": "pc-windows-msvc", +}[os] + +archive_format = { + "linux": "tar.xz", + "macos": "tar.xz", + "windows": "zip", +}[os] + +name = "probe-rs-tools-{arch}-{os_str}".format(arch=arch, os_str=os_str) + +asset = release.get_asset_url("{name}.{archive_format}".format(name=name, archive_format=archive_format)) + +install_binary(extract_from_url(asset, "{name}/cargo-embed".format(name=name)), "cargo-embed") +install_binary(extract_from_url(asset, "{name}/cargo-embed".format(name=name)), "cargo-flash") +install_binary(extract_from_url(asset, "{name}/cargo-embed".format(name=name)), "probe-rs")