Skip to content

Commit

Permalink
Format and fix messages from cmta studentify/linearize/`delinea…
Browse files Browse the repository at this point in the history
…rize` (#273)
  • Loading branch information
eloots authored Jul 31, 2023
1 parent 911795f commit 744e9c6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ object Delinearize:

for {
_ <- Right(()).withLeft[CmtError]
_ = println(s"De-linearizing ${toConsoleGreen(mainRepository.value.getPath)} to ${toConsoleGreen(
options.linearizeBaseDirectory.value.getPath)}")

mainRepoName = mainRepository.value.getName
linearizedRootFolder = options.linearizeBaseDirectory.value / mainRepoName

ExercisesMetadata(_, exercisesInMain, _) <- getExerciseMetadata(mainRepository.value)(config)
_ = println(
s"De-linearizing ${toConsoleGreen(linearizedRootFolder.getPath)} to ${toConsoleGreen(mainRepository.value.getCanonicalPath)}")

linearizedRootFolder = options.linearizeBaseDirectory.value / mainRepoName
ExercisesMetadata(_, exercisesInMain, _) <- getExerciseMetadata(mainRepository.value)(config)

exercisesAndSHAsInLinearized <- getExercisesAndSHAs(linearizedRootFolder)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ object Linearize:
mainRepoName = mainRepository.value.getName
tmpFolder = sbtio.createTemporaryDirectory
cleanedMainRepo = tmpFolder / mainRepository.value.getName
ExercisesMetadata(prefix, exercises, exerciseNumbers) <- getExerciseMetadata(mainRepository.value)(config)
ExercisesMetadata(_, exercises, _) <- getExerciseMetadata(mainRepository.value)(config)
linearizedRootFolder = options.linearizeBaseDirectory.value / mainRepoName

_ = println(
s"Linearizing ${toConsoleGreen(mainRepoName)} to ${toConsoleGreen(options.linearizeBaseDirectory.value.getPath)}")

_ = {
println(s"Linearizing ${toConsoleGreen(mainRepoName)} to ${toConsoleGreen(linearizedRootFolder.getPath)}")
}
_ <- checkpreExistingAndCreateArtifactRepo(
options.linearizeBaseDirectory.value,
linearizedRootFolder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ object Studentify:
studentifiedRootFolder = options.studentifyBaseDirectory.value / mainRepoName
solutionsFolder = studentifiedRootFolder / config.studentifiedRepoSolutionsFolder

_ = println(
s"Studentifying ${toConsoleGreen(mainRepoName)} to ${toConsoleGreen(options.studentifyBaseDirectory.value.getPath)}")
_ = {
val destinationPath = (options.studentifyBaseDirectory.value / mainRepoName).getPath
println(s"Studentifying ${toConsoleGreen(mainRepoName)} to ${toConsoleGreen(destinationPath)}")
}

_ <- checkpreExistingAndCreateArtifactRepo(
options.studentifyBaseDirectory.value,
Expand Down

0 comments on commit 744e9c6

Please sign in to comment.