added method to upload filesystem images
All checks were successful
Build Project / test (push) Successful in 5m58s
All checks were successful
Build Project / test (push) Successful in 5m58s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::{fs, path::PathBuf};
|
||||
|
||||
use log::info;
|
||||
use log::{debug, info};
|
||||
use std::str::FromStr;
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -69,11 +69,13 @@ pub fn get_files(
|
||||
.strip_suffix(".bin")
|
||||
.ok_or(GetFilesError::Extension)?
|
||||
.replace('-', ".");
|
||||
// TODO this is kinda messy
|
||||
let board_config = BoardConfig::from_str(split_name[1])?;
|
||||
let service = split_name[0];
|
||||
let board_type = BoardType::from_str(&product_name).unwrap();
|
||||
let version_replaced = version.replace('.', "_");
|
||||
let fw_url =
|
||||
format!("{hostname}/firmware/{board_type}/{board_config}/{version_replaced}.bin");
|
||||
format!("{hostname}/{service}/{board_type}/{board_config}/{version_replaced}.bin");
|
||||
let cfg = OTAConfiguration {
|
||||
version: version.to_string(),
|
||||
url: fw_url,
|
||||
|
||||
Reference in New Issue
Block a user