Test
Some checks failed
Build Project / test (push) Failing after 6m9s

This commit is contained in:
2025-02-06 17:27:59 +00:00
parent 31b90e223f
commit 0257434b26
8 changed files with 60 additions and 41 deletions

View File

@@ -63,15 +63,15 @@ pub fn get_files(
.ok_or(GetFilesError::Filename)?
.to_str()
.ok_or(GetFilesError::Filename)?
.split("_")
.split('_')
.collect();
let version = split_name[2]
.strip_suffix(".bin")
.ok_or(GetFilesError::Extension)?
.replace("-", ".");
.replace('-', ".");
let board_config = BoardConfig::from_str(split_name[1])?;
let board_type = BoardType::from_str(&product_name).unwrap();
let version_replaced = version.replace(".", "_");
let version_replaced = version.replace('.', "_");
let fw_url =
format!("{hostname}/firmware/{board_type}/{board_config}/{version_replaced}.bin");
let cfg = OTAConfiguration {
@@ -82,7 +82,7 @@ pub fn get_files(
};
configs.push(cfg);
} else if path.is_dir() {
println!("Directory: {:?}", path);
println!("Directory: {path:?}");
}
}