wip: find latest version

This commit is contained in:
Mylloon 2023-09-03 13:16:29 +02:00
parent b18a50c7ad
commit 9a3e8d7e31
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,4 +1,16 @@
pub fn debug() {
eprintln!("Hello, world!");
std::thread::sleep(std::time::Duration::from_millis(100))
use octocrab::models::repos::Release;
pub async fn search() {
eprintln!("{:#?}", get_latest_version().await)
}
async fn get_latest_version() -> Release {
let octocrab = octocrab::instance();
octocrab
.repos("revanced", "revanced-patches")
.releases()
.get_latest()
.await
.expect("Can't find the latest version of Revanced")
}