1

I installed the sbt-release plugin in my scala sbt project.

But when I run sbt release cross build or sbt release skip-tests, I get this error:

Not a valid key: cross (similar: crossPaths, crossTarget, cross-paths)
dg99
  • 5,456
  • 3
  • 37
  • 49
Yu QIAN
  • 177
  • 3
  • 12

2 Answers2

3

If you want to run release cross with-defaults or release skip-tests from the command line you need to quote it:

$ sbt 'release cross with-defaults'

$ sbt 'release skip-tests'
Dale Wijnand
  • 6,054
  • 5
  • 28
  • 55
  • thanks, this worked, so following up question, can we set a version to release? like, sbt 'release 0.1.7', I know this grammar is wrong, but I don't know whether sbt release support assigning a version ourself or not. – Yu QIAN May 04 '15 at 12:41
  • One options is `with-defaults`, as described in the README: https://github.com/sbt/sbt-release#non-interactive-release – Dale Wijnand May 04 '15 at 13:20
  • But how to give the version, with-defaults will use the version suggested by sbt itself. and I tried 'sbt 'release with-defaults 0.1.7' ', but it's wrong – Yu QIAN May 04 '15 at 13:32
0

For some reason the release plugin doesn't play nice when you run it this way. Try running sbt, then run release from within the console.

Kraylog
  • 7,383
  • 1
  • 24
  • 35