Skip to content

Commit

Permalink
fix: fix the retrieval of the latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
chevdor committed Jul 14, 2021
1 parent e317711 commit 34bbb1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const CACHE_FILE: &str = "srtool-tag-latest.txt";
/// Fetch the latest image tag
pub fn fetch_image_tag() -> Result<String, ureq::Error> {
debug!("Fetching latest version from github");
let url = "https://github.com/paritytech/srtool/-/raw/master/RUSTC_VERSION";
let tag: String = ureq::get(url).set("Content-Type", "application/txt").call()?.into_string()?;
let url = "https://raw.githubusercontent.com/paritytech/srtool/master/RUSTC_VERSION";
let tag: String = ureq::get(url).set("Content-Type", "application/txt").call()?.into_string()?.trim().to_string();
debug!("tag: {}", tag);
Ok(tag)
}
Expand Down

0 comments on commit 34bbb1a

Please sign in to comment.