Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert: self updator #486

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading