This repository was archived by the owner on Mar 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,14 @@ jobs:
51
51
52
52
- name : Generate Tests Script using CMT
53
53
run : |
54
+ git config --global user.email "[email protected] "
55
+ git config --global user.name "Lunatech Labs"
54
56
(cd CMT/ && exec sbt "mainadm -dot -t ../runTests $GITHUB_WORKSPACE/course-repo")
55
57
56
58
- name : Run Tests
57
59
run : |
58
60
chmod +x runTests
61
+ export PATH=${PATH}:$GITHUB_WORKSPACE/CMT/bin
59
62
./runTests
60
63
61
64
create_release :
@@ -104,6 +107,7 @@ jobs:
104
107
- name : Studentify Repo
105
108
run : |
106
109
mkdir -p studentified
110
+ export PATH=${PATH}:$GITHUB_WORKSPACE/CMT/bin
107
111
git config --global user.email "[email protected] "
108
112
git config --global user.name "Lunatech Labs"
109
113
(cd CMT/ && exec sbt "studentify -dot -g ../lunatech-scala-2-to-scala3-course ../studentified")
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import sbt.Keys._
22
22
import sbt ._
23
23
import sbtstudent .AdditionalSettings
24
24
import dotty .tools .sbtplugin .DottyPlugin .autoImport .DottyCompatModuleID
25
+ import sbtstudent .StudentCommandsPlugin ._
25
26
26
27
27
28
object CommonSettings {
@@ -41,7 +42,8 @@ object CommonSettings {
41
42
publishArtifact in packageDoc := false ,
42
43
libraryDependencies ++= Dependencies .dependencies,
43
44
libraryDependencies ++= Dependencies .crossDependencies.map(_.withDottyCompat(scalaVersion.value)),
44
- testFrameworks += new TestFramework (" munit.Framework" )
45
+ testFrameworks += new TestFramework (" munit.Framework" ),
46
+ shellPrompt := (state => renderCMTPrompt(state))
45
47
) ++
46
48
AdditionalSettings .initialCmdsConsole ++
47
49
AdditionalSettings .initialCmdsTestConsole ++
Original file line number Diff line number Diff line change @@ -55,13 +55,15 @@ object StudentCommandsPlugin extends AutoPlugin {
55
55
IO .readLines(new sbt.File (new sbt.File (Project .extract(state).structure.root), " .courseName" )).head
56
56
}
57
57
58
- override lazy val projectSettings : Seq [Def .Setting [State => String ]] =
58
+ def renderCMTPrompt (state : State ) = {
59
+ val exercise = Console .GREEN + extractCurrentExerciseDesc(state) + Console .RESET
60
+ val manRmnd = Console .GREEN + " man [e]" + Console .RESET
61
+ val prjNbrNme = extractProjectName(state)
62
+ s " $manRmnd > $prjNbrNme > $exercise > "
63
+ }
64
+
65
+ override def projectSettings : Seq [Def .Setting [State => String ]] =
59
66
Seq (
60
- shellPrompt := { state =>
61
- val exercise = Console .GREEN + extractCurrentExerciseDesc(state) + Console .RESET
62
- val manRmnd = Console .GREEN + " man [e]" + Console .RESET
63
- val prjNbrNme = extractProjectName(state)
64
- s " $manRmnd > $prjNbrNme > $exercise > "
65
- }
67
+ shellPrompt := { state => renderCMTPrompt(state)}
66
68
)
67
69
}
You can’t perform that action at this time.
0 commit comments