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)
|
let mut process = Command::new(self.path)
|
||||||
.current_dir(".")
|
.current_dir(".")
|
||||||
.stdout(Stdio::piped())
|
//.stdout(Stdio::piped())
|
||||||
.stderr(Stdio::piped())
|
//.stderr(Stdio::piped())
|
||||||
.spawn()?;
|
.spawn()?;
|
||||||
|
|
||||||
{
|
//{
|
||||||
let stdout = process.stdout.as_mut().unwrap();
|
// let stdout = process.stdout.as_mut().unwrap();
|
||||||
let stdout_reader = BufReader::new(stdout);
|
// let stdout_reader = BufReader::new(stdout);
|
||||||
let mut stdout_lines = stdout_reader.lines();
|
// let mut stdout_lines = stdout_reader.lines();
|
||||||
while let Some(Ok(line)) = stdout_lines.next() {
|
// while let Some(Ok(line)) = stdout_lines.next() {
|
||||||
log::info!(process=log::as_display!(self.name); "{}", line)
|
// log::info!("{}", line);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
process.wait()?;
|
process.wait()?;
|
||||||
|
|
||||||
|
@ -23,12 +23,14 @@ pub fn extract_cuddle(config: CuddleConfig) -> anyhow::Result<Arc<Mutex<Vec<Cudd
|
|||||||
curr_dir.push(".cuddle/");
|
curr_dir.push(".cuddle/");
|
||||||
let fetch_policy = config.get_fetch_policy()?;
|
let fetch_policy = config.get_fetch_policy()?;
|
||||||
if let CuddleFetchPolicy::Always = fetch_policy {
|
if let CuddleFetchPolicy::Always = fetch_policy {
|
||||||
if let Err(res) = std::fs::remove_dir_all(curr_dir) {
|
if curr_dir.exists() {
|
||||||
panic!("{}", res)
|
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()?;
|
let cuddle_yaml = find_root_cuddle()?;
|
||||||
log::trace!(cuddle_yaml=log::as_debug!(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": {
|
"scripts": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"title": "Scripts the cuddle cli can execute",
|
"title": "Scripts the cuddle cli can execute",
|
||||||
"description": "Scripts the cuddle cli can execute 'cuddle x my-awesome-script'",
|
"description": "Scripts the cuddle cli can execute 'cuddle x my-awesome-script'",
|
||||||
|
"additionalProperties": false,
|
||||||
"patternProperties": {
|
"patternProperties": {
|
||||||
"^.*$": {
|
"^.*$": {
|
||||||
"required": [
|
"required": [
|
||||||
@ -34,7 +52,8 @@
|
|||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
},
|
||||||
|
"additionalProperties": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user