Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions project/scripts/bisect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ val usageMessage = """
|The <validation-command> should be one of:
|* compile <arg1> <arg2> ...
|* run <arg1> <arg2> ...
|* test <arg1> <arg2> ...
|* <custom-validation-script-path>
|
|The arguments for 'compile' and 'run' should be paths to the source file(s) and optionally additional options passed directly to scala-cli.
Expand Down Expand Up @@ -100,20 +101,24 @@ object ScriptOptions:
enum ValidationCommand:
case Compile(args: Seq[String])
case Run(args: Seq[String])
case Test(args: Seq[String])
case CustomValidationScript(scriptFile: File)

def validationScript: File = this match
case Compile(args) =>
ValidationScript.tmpScalaCliScript(command = "compile", args)
case Run(args) =>
ValidationScript.tmpScalaCliScript(command = "run", args)
case Test(args) =>
ValidationScript.tmpScalaCliScript(command = "test", args)
case CustomValidationScript(scriptFile) =>
ValidationScript.copiedFrom(scriptFile)

object ValidationCommand:
def fromArgs(args: Seq[String]) = args match
case Seq("compile", commandArgs*) => Compile(commandArgs)
case Seq("run", commandArgs*) => Run(commandArgs)
case Seq("test", commandArgs*) => Test(commandArgs)
case Seq(path) => CustomValidationScript(new File(path))


Expand Down