10

When I run the version command in the sbt console it shows "0.1.0-SNAPSHOT". Is this the current sbt version?

I'm used the Getting Started guide on the SBT wiki to install sbt on my system.

Shaun the Sheep
  • 22,353
  • 1
  • 72
  • 100

2 Answers2

13

The version command prints the version of the project you are building. You probably want sbt-version.

Shaun the Sheep
  • 22,353
  • 1
  • 72
  • 100
  • 2
    As of sbt 1.0, needs to be `sbt sbtVersion`. Hyphenated commands not supported anymore. (https://www.scala-sbt.org/1.x/docs/sbt-1.0-Release-Notes.html) – Peter Krieg Sep 17 '18 at 15:00
5

To check version of the sbt that you are using:

$ sbt sbt-version   
Morteza Shahriari Nia
  • 1,392
  • 18
  • 24
  • This is not true, it shows the version of sbt that is specified in the project, not the sbt version that is running. – kap Mar 30 '20 at 09:18