Some updates

This commit is contained in:
Nikolai Rodionov 2024-06-15 20:54:19 +02:00
parent f40fea7955
commit 055072f491
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
2 changed files with 8 additions and 1 deletions

View File

@ -18,6 +18,12 @@ pub(crate) enum SupportedIncludes {
Charts,
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, Default)]
pub(crate) struct Hooks{
pre_hooks: Option<Vec<String>>,
post_hooks: Option<Vec<String>>
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, Default)]
pub(crate) struct ChartExtended {
#[serde(flatten)]
@ -52,6 +58,7 @@ pub(crate) struct Config {
pub(crate) patches: Option<Vec<Patch>>,
#[serde(default = "empty_vec")]
pub(crate) mirrors: Vec<Mirror>,
pub(crate) hooks: Hooks,
}
fn empty_vec<T>() -> Vec<T> {

View File

@ -1,4 +1,4 @@
use std::{
use std::{
fs::{self, read_dir, remove_dir_all, File, OpenOptions},
io::Write,
path::{Path, PathBuf},