Browse Source

some fixes

tags/v0.3.11-rc1
Shar-jeel-Sajid 10 months ago
parent
commit
eba54fbfb3
3 changed files with 20 additions and 1 deletions
  1. +6
    -1
      binaries/cli/Cargo.toml
  2. +6
    -0
      binaries/cli/build.rs
  3. +8
    -0
      binaries/cli/src/lib.rs

+ 6
- 1
binaries/cli/Cargo.toml View File

@@ -50,7 +50,12 @@ tabwriter = "1.4.0"
log = { version = "0.4.21", features = ["serde"] }
colored = "2.1.0"
env_logger = "0.11.3"
self_update = { version = "0.27.0", features = ["rustls", "archive-zip"], default-features = false }
self_update = { version = "0.27.0", features = [
"rustls",
"archive-zip",
"archive-tar",
"compression-flate2",
], default-features = false }
pyo3 = { workspace = true, features = [
"extension-module",
"abi3",


+ 6
- 0
binaries/cli/build.rs View File

@@ -0,0 +1,6 @@
fn main() {
println!(
"cargo:rustc-env=TARGET={}",
std::env::var("TARGET").unwrap()
);
}

+ 8
- 0
binaries/cli/src/lib.rs View File

@@ -555,9 +555,17 @@ fn run(args: Args) -> eyre::Result<()> {
SelfSubCommand::Update { check_only } => {
println!("Checking for updates...");

#[cfg(target_os = "linux")]
let bin_path_in_archive = format!("dora-cli-{}/dora", env!("TARGET"));
#[cfg(target_os = "macos")]
let bin_path_in_archive = format!("dora-cli-{}/dora", env!("TARGET"));
#[cfg(target_os = "windows")]
let bin_path_in_archive = String::from("dora.exe");

let status = self_update::backends::github::Update::configure()
.repo_owner("dora-rs")
.repo_name("dora")
.bin_path_in_archive(&bin_path_in_archive)
.bin_name("dora")
.show_download_progress(true)
.current_version(env!("CARGO_PKG_VERSION"))


Loading…
Cancel
Save