wip: find latest version
This commit is contained in:
parent
b18a50c7ad
commit
9a3e8d7e31
1 changed files with 15 additions and 3 deletions
|
@ -1,4 +1,16 @@
|
||||||
pub fn debug() {
|
use octocrab::models::repos::Release;
|
||||||
eprintln!("Hello, world!");
|
|
||||||
std::thread::sleep(std::time::Duration::from_millis(100))
|
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")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue