From dbca1cc32912c68ebac521c701b5b6003116084f Mon Sep 17 00:00:00 2001 From: Dhruv Dhamani Date: Sun, 21 Jan 2024 11:08:39 -0500 Subject: [PATCH] fixed self-update --- Cargo.lock | 170 ---------------------------------------------------- Cargo.toml | 9 +-- src/main.rs | 6 +- 3 files changed, 4 insertions(+), 181 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4862e5ed7..3c74a8716 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -524,12 +524,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - [[package]] name = "const-random" version = "0.1.17" @@ -612,34 +606,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "curve25519-dalek" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" -dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest", - "fiat-crypto", - "platforms", - "rustc_version", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "darling" version = "0.14.4" @@ -675,16 +641,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", -] - [[package]] name = "deranged" version = "0.3.11" @@ -759,31 +715,6 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8", - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" -dependencies = [ - "curve25519-dalek", - "ed25519", - "serde", - "sha2", - "signature", - "subtle", - "zeroize", -] - [[package]] name = "either" version = "1.9.0" @@ -872,24 +803,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" -[[package]] -name = "fiat-crypto" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" - -[[package]] -name = "filetime" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "windows-sys 0.52.0", -] - [[package]] name = "flate2" version = "1.0.28" @@ -1870,28 +1783,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - [[package]] name = "pkg-config" version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" -[[package]] -name = "platforms" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" - [[package]] name = "plist" version = "1.6.0" @@ -2205,15 +2102,6 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - [[package]] name = "rustix" version = "0.38.30" @@ -2378,8 +2266,6 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a34ad8e4a86884ab42e9b8690e9343abdcfe5fa38a0318cfe1565ba9ad437b4" dependencies = [ - "either", - "flate2", "hyper 0.14.28", "indicatif", "log", @@ -2389,11 +2275,8 @@ dependencies = [ "self-replace", "semver", "serde_json", - "tar", "tempfile", "urlencoding", - "zip", - "zipsign-api", ] [[package]] @@ -2501,16 +2384,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest", - "rand_core", -] - [[package]] name = "similar" version = "2.4.0" @@ -2593,16 +2466,6 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - [[package]] name = "state" version = "0.6.0" @@ -2735,17 +2598,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "tar" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" -dependencies = [ - "filetime", - "libc", - "xattr", -] - [[package]] name = "tempfile" version = "3.9.0" @@ -3555,17 +3407,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "xattr" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" -dependencies = [ - "libc", - "linux-raw-sys", - "rustix", -] - [[package]] name = "xdg" version = "2.5.2" @@ -3636,17 +3477,6 @@ dependencies = [ "zip", ] -[[package]] -name = "zipsign-api" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ba5aa1827d6b1a35a29b3413ec69ce5f796e4d897e3e5b38f461bef41d225ea" -dependencies = [ - "base64", - "ed25519-dalek", - "thiserror", -] - [[package]] name = "zstd" version = "0.11.2+zstd.1.5.2" diff --git a/Cargo.toml b/Cargo.toml index 3ce5ff919..67b3b38ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,14 +29,7 @@ serde = { version = "1.0.195", features = ["derive"] } serde_json = "1.0.111" tabled = "0.10.0" rhai = { version = "1.16.3", features = ["metadata", "decimal", "sync"] } -self_update = { version = "0.39.0", features = [ - "rustls", - "archive-tar", - "archive-zip", - "compression-flate2", - "compression-zip-deflate", - "compression-zip-bzip2", -] } +self_update = { version = "0.39.0", features = ["rustls"] } typed-builder = "0.18.1" postgrest = "1.6.0" reqwest = { version = "0.11.23", features = ["json", "rustls-tls"] } diff --git a/src/main.rs b/src/main.rs index e0d181c9f..5ad409db2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,10 +38,10 @@ use zip_extensions::zip_create_from_directory; /// Updates binary based on github releases fn update() -> Result<()> { - let status = self_update::backends::github::Update::configure() + self_update::backends::github::Update::configure() .repo_owner("dhruvdh") .repo_name("umm") - .bin_name((format!("umm-{}", self_update::get_target())).as_str()) + .bin_name("umm") .no_confirm(true) .target_version_tag("spring_24") .show_download_progress(true) @@ -50,7 +50,7 @@ fn update() -> Result<()> { .build()? .update()?; - eprintln!("Update status: `{}`!", status.version()); + eprintln!("Update done!"); Ok(()) }