gseitz/sbt-release — Issue #9: publish is done with pre-release version, not the version supplied as releaseVersion to inquireVersions
Author: haraldme
Created: 2012-01-03 18:35:43+00:00
State: open

I'm having trouble getting the release plugin (release 0.4, and my project is currently using sbt 0.11.1) to publish artifacts using the version I'm supplying as releaseVersion to inquireVersions.

Initially, my project has e.g. version := "0.1-SNAPSHOT".

I run "sbt release", using the default releaseProcess. In the inquireVersions ReleasePart, it suggests "0.1" as the releaseVersion, and I accept the suggestion.

When I reach the releaseTask(publish in Global in ref) ReleasePart, sbt packages and publishes a "0.1-SNAPSHOT" version of my artifact -- rather than the "0.1" artifacts I were expecting.

To check whether there's something strange in my project's sbt config that's causing these problems, I've also tried to add the release plugin to a checkout of the "sbt-release" project, and supplied a non-default releaseVersion there. However, that also did not work as I expected it to:

[info] Loading project definition from /Users/hmeland/src/sbt-release/project
[info] Set current project to sbt-release (in build file:/Users/hmeland/src/sbt-release/)
> about
[info] This is sbt 0.11.2
[info] The current project is {file:/Users/hmeland/src/sbt-release/}default-b74fd5
[info] The current project is built against Scala 2.9.1
[info] sbt, sbt plugins, and build definitions are using Scala 2.9.1
> release
[info] Starting release process off git commit: 114873ede58616d2a44a84330390955dc7e10465
[info] Updating {file:/Users/hmeland/src/sbt-release/}default-b74fd5...
[info] Resolving org.scala-tools.sbt#sbt_2.9.1;0.11.2 ...
[...]
[info] Done updating.
[info] Compiling 5 Scala sources to /Users/hmeland/src/sbt-release/target/scala-2.9.1/sbt-0.11.2/classes...
Release version [0.4] : 0.5
Next version [0.6-SNAPSHOT] :
[info] No tests to run for test:test
[success] Total time: 0 s, completed Jan 3, 2012 6:00:08 PM
[info] Setting version to '0.5'.
[info] Reapplying settings...
[info] Set current project to sbt-release (in build file:/Users/hmeland/src/sbt-release/)
[info] Reapplying settings...
[info] Set current project to sbt-release (in build file:/Users/hmeland/src/sbt-release/)
[info] Reapplying settings...
[info] Set current project to sbt-release (in build file:/Users/hmeland/src/sbt-release/)
[info] Packaging /Users/hmeland/src/sbt-release/target/scala-2.9.1/sbt-0.11.2/sbt-release-0.4-sources.jar ...
[info] Generating API documentation for main sources...
[info] Packaging /Users/hmeland/src/sbt-release/target/scala-2.9.1/sbt-0.11.2/sbt-release-0.4.jar ...
[info] Wrote /Users/hmeland/src/sbt-release/target/scala-2.9.1/sbt-0.11.2/sbt-release-0.4.pom
[info] Done packaging.
[info] :: delivering :: com.github.gseitz#sbt-release;0.4 :: 0.4 :: release :: Tue Jan 03 18:00:09 CET 2012
[info]	delivering ivy file to /Users/hmeland/src/sbt-release/target/scala-2.9.1/sbt-0.11.2/ivy-0.4.xml
[info] Done packaging.
model contains 11 documentable templates
[info] API documentation generation successful.
[info] Packaging /Users/hmeland/src/sbt-release/target/scala-2.9.1/sbt-0.11.2/sbt-release-0.4-javadoc.jar ...
[info] Done packaging.
[info]	published sbt-release to /Users/hmeland/dev/repo/com/github/gseitz/sbt-release_2.9.1_0.11.2/0.4/sbt-release-0.4.pom
[info]	published sbt-release to /Users/hmeland/dev/repo/com/github/gseitz/sbt-release_2.9.1_0.11.2/0.4/sbt-release-0.4.jar
[info]	published sbt-release to /Users/hmeland/dev/repo/com/github/gseitz/sbt-release_2.9.1_0.11.2/0.4/sbt-release-0.4-sources.jar
[info]	published sbt-release to /Users/hmeland/dev/repo/com/github/gseitz/sbt-release_2.9.1_0.11.2/0.4/sbt-release-0.4-javadoc.jar
[success] Total time: 3 s, completed Jan 3, 2012 6:00:11 PM

Is this a bug (in the plugin or in sbt itself?), or is it just me that's going about this the wrong way, somehow?