use self_update::{cargo_crate_version, version}; pub(crate) fn update() { println!("Updating to the latest version..."); let backend = self_update::backends::gitea::Update::configure() .with_host("https://code.kiers.eu") .repo_owner("jjkiers") .repo_name("layer4-proxy") .bin_name("l4p") .show_download_progress(true) .current_version(cargo_crate_version!()) .build() .expect("Should initialize correctly."); let status = backend.update_extended(); match status { Err(e) => eprintln!("Error updating: {e}"), Ok(_) => (), } }