Skip to content

Commit 9d6eb22

Browse files
committed
Special case .csproj in prepare_submission
1 parent e1103de commit 9d6eb22

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tmc-langs/src/submission_packaging.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,27 @@ pub fn prepare_submission(
269269
}
270270
}
271271

272+
log::debug!("copying csproj files in clone/*/src");
273+
for entry in WalkDir::new(clone_path.join("src"))
274+
.min_depth(2)
275+
.max_depth(2)
276+
{
277+
let entry = entry?;
278+
if entry.path().is_file()
279+
&& entry
280+
.path()
281+
.extension()
282+
.map(|ext| ext == "csproj")
283+
.unwrap_or_default()
284+
{
285+
let relative = entry
286+
.path()
287+
.strip_prefix(&clone_path)
288+
.expect("always inside clone root");
289+
file_util::copy(entry.path(), dest.join(relative))?;
290+
}
291+
}
292+
272293
// copy files from config
273294
log::debug!("copying files according to packaging config");
274295
let config = TmcProjectYml::load_or_default(clone_path)?;

0 commit comments

Comments
 (0)