We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bca44c9 commit c2ba5a1Copy full SHA for c2ba5a1
modules/cli/src/main/scala/scala/cli/commands/Version.scala
@@ -0,0 +1,12 @@
1
+package scala.cli.commands
2
+
3
+import caseapp._
4
5
+import scala.build.internal.Constants
6
7
+object Version extends ScalaCommand[VersionOptions] {
8
+ override def group = "Miscellaneous"
9
+ def run(options: VersionOptions, args: RemainingArgs): Unit = {
10
+ println(Constants.version)
11
+ }
12
+}
modules/cli/src/main/scala/scala/cli/commands/VersionOptions.scala
@@ -0,0 +1,11 @@
+@HelpMessage("Print scala-cli version")
+final case class VersionOptions()
+object VersionOptions {
+ implicit val parser = Parser[VersionOptions]
+ implicit val help = Help[VersionOptions]
0 commit comments