MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / fetch_latest_stable_version

Function fetch_latest_stable_version

src/cloud.rs:199–213  ·  view source on GitHub ↗

Fetches the latest stable release version from GitHub.

()

Source from the content-addressed store, hash-verified

197
198/// Fetches the latest stable release version from GitHub.
199pub fn fetch_latest_stable_version() -> Option<String> {
200 let agent = agent_with_timeout(FETCH_TIMEOUT);
201 let release: GitHubRelease = agent
202 .get(GITHUB_RELEASES_URL)
203 .header("User-Agent", "tracedecay")
204 .call()
205 .ok()?
206 .body_mut()
207 .read_json()
208 .ok()?;
209 if !release_has_current_platform_asset(&release) {
210 return None;
211 }
212 Some(release.tag_name.trim_start_matches('v').to_string())
213}
214
215/// Fetches the latest prerelease version from GitHub.
216pub fn fetch_latest_beta_version() -> Option<String> {

Callers 2

fetch_latest_versionFunction · 0.85
switch_channelFunction · 0.85

Calls 3

agent_with_timeoutFunction · 0.85
callMethod · 0.45

Tested by

no test coverage detected