Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Idiomatic use of sbt to release (tested) artifacts

Tags:

scala

sbt

I want to use sbt to publish my project.

I'm used to maven, and need some help (mentally) transitioning.

By default I see 'publish' depends on 'package', but 'package' does not depend on 'test'. Of course I only want to publish tested code. How should I ensure this?

Of course I could make package depend on test, but the fact that this is not the default sort of suggests this is not idiomatic use of sbt. What would be the 'right' way to achieve this?

How do I find out more about best practices?

like image 223
Arnout Engelen Avatar asked Aug 19 '15 11:08

Arnout Engelen


1 Answers

I am always running sbt clean test publish-local publish (or publish-signed). This ensures any error that occurs before publish halts the process.

Another possibility would be to use the sbt-release plugin. This runs tests and also watches and adjusts your version strings.

like image 50
0__ Avatar answered Oct 23 '22 16:10

0__