Skip to content

Commit

Permalink
Delete version update check (#387)
Browse files Browse the repository at this point in the history
* Fix build flag

* Delete update functionality
  • Loading branch information
reese authored and reese-stripe committed Sep 12, 2023
1 parent ed99cc4 commit 4134127
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 156 deletions.
7 changes: 0 additions & 7 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 @@ -22,7 +22,6 @@ ignore = "0.4.18"
lazy_static = "1.4.0"
regex = "1.6.0"
rubyfmt = { path = "./librubyfmt" }
semver = "1.0.1"
serde = { version = "1.0", features = ["derive"] }
similar = "2.1.0"
ureq = { version = "2.1.1", features = ["json"] }
1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ fn main() {
#[cfg(target_os = "macos")]
{
println!("cargo:rustc-link-lib=framework=foundation");
println!("cargo:rustc-link-lib=framework=security");
}

#[cfg(target_os = "linux")]
Expand Down
20 changes: 0 additions & 20 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![deny(warnings, missing_copy_implementations)]

mod updates;
use clap::Parser;
use ignore::WalkBuilder;
use regex::Regex;
Expand Down Expand Up @@ -42,14 +41,6 @@ enum ExecutionError {
#[derive(Debug, Parser)]
#[clap(author, version, about, long_about = None)]
struct CommandlineOpts {
/// Fetch current latest version
#[clap(long)]
internal_fetch_latest_version: bool,

/// Disables hints to update rubyfmt
#[clap(long, name = "silence-update-messages")]
silence_update_message: bool,

/// Turn on check mode. This outputs diffs of inputs to STDOUT. Will exit non-zero when differences are detected.
#[clap(short, long)]
check: bool,
Expand Down Expand Up @@ -340,16 +331,9 @@ fn puts_stdout(input: &String) {
}

fn main() {
updates::begin_checking_for_updates();

let opts = get_command_line_options();

match opts {
CommandlineOpts {
internal_fetch_latest_version: true,
..
} => updates::fetch_latest_version().unwrap(),

CommandlineOpts { check: true, .. } => {
initialize_rubyfmt();
let text_diffs: Arc<Mutex<Vec<String>>> = Arc::new(Mutex::new(Vec::new()));
Expand Down Expand Up @@ -415,8 +399,4 @@ fn main() {
})
}
}

if !opts.silence_update_message {
updates::report_if_update_available();
}
}
128 changes: 0 additions & 128 deletions src/updates.rs

This file was deleted.

0 comments on commit 4134127

Please sign in to comment.