Skip to content

Commit

Permalink
Revert "feat: add self updator (#453)"
Browse files Browse the repository at this point in the history
This reverts commit 9d0c686.
  • Loading branch information
Mogyuchi committed Oct 24, 2024
1 parent b4cdb75 commit 1cc4f8a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 128 deletions.
108 changes: 0 additions & 108 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ serde = { version = "=1.0.213", features = ["derive"] }
serde_derive = "=1.0.213"
serde_json = "=1.0.132"
sysinfo = "=0.32.0"
self_update = "0.41.0"

[build-dependencies]
git2 = { version = "=0.19.0", default-features = false }
Expand Down
20 changes: 1 addition & 19 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ mod unix_to_date;
use arc_swap::ArcSwap;
use dotenvy::dotenv;
use rust_socketio::{ClientBuilder, Event, Payload, RawClient};
use self_update::cargo_crate_version;
use serde_derive::{Deserialize, Serialize};
use serde_json::json;
use std::{
env, hint,
path::Path,
process::{self},
process,
sync::{Arc, Mutex},
thread,
time::Duration,
Expand Down Expand Up @@ -63,21 +62,6 @@ impl ::std::default::Default for AppConfig {
}
}

fn update() -> Result<(), Box<dyn (::std::error::Error)>> {
let config = self_update::backends::github::Update::configure()
.repo_owner("eoeo-org")
.repo_name("pcsc-rs")
.bin_name("pcsc-rs")
.show_download_progress(true)
.current_version(cargo_crate_version!())
.no_confirm(true)
.build()?;

config.update()?;

Ok(())
}

fn main() {
let rs = Path::new(".env").exists();
if rs {
Expand All @@ -98,8 +82,6 @@ fn main() {
}

fn start() {
let _ = update();

let mut system = System::new_all();

let shared_data = Arc::new(ArcSwap::from_pointee(SystemStatus::get(&mut system)));
Expand Down

0 comments on commit 1cc4f8a

Please sign in to comment.