update schema to include variables
This commit is contained in:
parent
60398bbb2e
commit
91072cc4e6
@ -28,18 +28,18 @@ Starting running shell action: {}
|
||||
|
||||
let mut process = Command::new(self.path)
|
||||
.current_dir(".")
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped())
|
||||
//.stdout(Stdio::piped())
|
||||
//.stderr(Stdio::piped())
|
||||
.spawn()?;
|
||||
|
||||
{
|
||||
let stdout = process.stdout.as_mut().unwrap();
|
||||
let stdout_reader = BufReader::new(stdout);
|
||||
let mut stdout_lines = stdout_reader.lines();
|
||||
while let Some(Ok(line)) = stdout_lines.next() {
|
||||
log::info!(process=log::as_display!(self.name); "{}", line)
|
||||
}
|
||||
}
|
||||
//{
|
||||
// let stdout = process.stdout.as_mut().unwrap();
|
||||
// let stdout_reader = BufReader::new(stdout);
|
||||
// let mut stdout_lines = stdout_reader.lines();
|
||||
// while let Some(Ok(line)) = stdout_lines.next() {
|
||||
// log::info!("{}", line);
|
||||
// }
|
||||
//}
|
||||
|
||||
process.wait()?;
|
||||
|
||||
|
@ -23,12 +23,14 @@ pub fn extract_cuddle(config: CuddleConfig) -> anyhow::Result<Arc<Mutex<Vec<Cudd
|
||||
curr_dir.push(".cuddle/");
|
||||
let fetch_policy = config.get_fetch_policy()?;
|
||||
if let CuddleFetchPolicy::Always = fetch_policy {
|
||||
if curr_dir.exists() {
|
||||
if let Err(res) = std::fs::remove_dir_all(curr_dir) {
|
||||
panic!("{}", res)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Load main cuddle file
|
||||
// Load main cuddle file.
|
||||
let cuddle_yaml = find_root_cuddle()?;
|
||||
log::trace!(cuddle_yaml=log::as_debug!(cuddle_yaml); "Find root cuddle");
|
||||
|
||||
|
@ -16,10 +16,28 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"vars": {
|
||||
"type": "object",
|
||||
"title": "your collection of variables to be available to cuddle",
|
||||
"patternProperties": {
|
||||
"^.*$": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"scripts": {
|
||||
"type": "object",
|
||||
"title": "Scripts the cuddle cli can execute",
|
||||
"description": "Scripts the cuddle cli can execute 'cuddle x my-awesome-script'",
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^.*$": {
|
||||
"required": [
|
||||
@ -34,7 +52,8 @@
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user