(project_name: &str, template: P)
| 95 | } |
| 96 | |
| 97 | pub fn cargo_lambda_init<P: AsRef<Path>>(project_name: &str, template: P) -> LambdaProject { |
| 98 | let project = project::project().build(); |
| 99 | |
| 100 | let cwd = dunce::canonicalize(project.root()).expect("failed to create canonical path"); |
| 101 | cwd.mkdir_p(); |
| 102 | |
| 103 | let name = format!("{}-{}", project_name, uuid::Uuid::new_v4()); |
| 104 | |
| 105 | LambdaProject { |
| 106 | name, |
| 107 | template: template.as_ref().to_path_buf(), |
| 108 | root: project.root(), |
| 109 | cwd, |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | pub fn cargo_lambda_build<P: AsRef<Path>>(path: P) -> Command { |
| 114 | let path = path.as_ref(); |
no test coverage detected