Added readme and license
This commit is contained in:
@@ -1,2 +1 @@
|
||||
pub mod updator;
|
||||
pub mod downloadyt;
|
||||
@@ -1,3 +1,5 @@
|
||||
use std::thread;
|
||||
|
||||
use serde::Deserialize;
|
||||
use semver::Version;
|
||||
use reqwest;
|
||||
@@ -12,9 +14,13 @@ pub async fn update() {
|
||||
let latest_version = Version::parse(&release_info.tag_name).unwrap();
|
||||
let current_version = Version::parse(env!("CARGO_PKG_VERSION")).unwrap();
|
||||
if latest_version > current_version {
|
||||
println!("Update Available")
|
||||
println!("Update Available! Please download the latest version");
|
||||
println!("URL: https://git.racooncity.org/brotoskyj/RhythmWorks/releases");
|
||||
thread::sleep(std::time::Duration::from_secs(10));
|
||||
std::process::exit(1);
|
||||
|
||||
}
|
||||
else {
|
||||
println!("Already on current version");
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user