cliGenerateCopierProject function
Implementation
Future<void> cliGenerateCopierProject(
String projectPath,
String studyTitle,
List<String> outcomes,
String gitUrl,
) async {
const copierBin = 'copier';
const copierTemplate = 'gh:hpi-studyu/copier-studyu';
try {
File(projectPath).deleteSync(recursive: true);
} catch (e) {
print(e);
}
await runCliProcess(copierBin, [
copierTemplate,
projectPath,
'--force',
'--data',
'study_title=$studyTitle',
'--data',
'outcomes=${jsonEncode(outcomes)}',
'--data',
'git_url=$gitUrl'
]);
}