sbt-release
sbt-release copied to clipboard
Plugin reports "Working directory is dirty" even when git says "working directory clean"
This is my first time using this plugin (but very familiar with the Maven release plugin), so this may be EBKAC. That said, here's my SBT console transcript (I have git
plugin installed too):
> git status
[info] On branch release/v0.0.3
[info] nothing to commit, working directory clean
On branch release/v0.0.3
nothing to commit, working directory clean
> release
java.lang.RuntimeException: Aborting release. Working directory is dirty.
at scala.sys.package$.error(package.scala:27)
at sbtrelease.ReleaseStateTransformations$$anonfun$initialVcsChecks$1.apply(ReleaseExtra.scala:107)
at sbtrelease.ReleaseStateTransformations$$anonfun$initialVcsChecks$1.apply(ReleaseExtra.scala:104)
at sbtrelease.ReleasePlugin$ReleaseKeys$$anonfun$2$$anonfun$apply$3.apply(ReleasePlugin.scala:68)
at sbtrelease.ReleasePlugin$ReleaseKeys$$anonfun$2$$anonfun$apply$3.apply(ReleasePlugin.scala:68)
at scala.collection.immutable.List.foreach(List.scala:318)
at sbtrelease.ReleasePlugin$ReleaseKeys$$anonfun$2.apply(ReleasePlugin.scala:68)
at sbtrelease.ReleasePlugin$ReleaseKeys$$anonfun$2.apply(ReleasePlugin.scala:36)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
at sbt.Command$.process(Command.scala:92)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.State$$anon$1.process(State.scala:184)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.MainLoop$.next(MainLoop.scala:98)
at sbt.MainLoop$.run(MainLoop.scala:91)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
at sbt.Using.apply(Using.scala:24)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
at sbt.MainLoop$.runLogged(MainLoop.scala:24)
at sbt.StandardMain$.runManaged(Main.scala:53)
at sbt.xMain.run(Main.scala:28)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:18)
at xsbt.boot.Boot$.runImpl(Boot.scala:41)
at xsbt.boot.Boot$.main(Boot.scala:17)
at xsbt.boot.Boot.main(Boot.scala)
[error] Aborting release. Working directory is dirty.
[error] Use 'last' for the full log.
>
Running last
doesn't provide any more info, nor does setting logLevel
.
I am having this exact same problem. Any ideas about what the issue is?
@xnickmx: I gave up on it; so no, never figured out how to use it or what the issue was.
Thanks, @metasim.
Perhaps more info about my setup will be helpful to @gseitz and team to debug this. My setup: Windows 7 Enterprise
SBT-Release plugin version: addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.7")
SBT and Scala info:
about [info] This is sbt 0.12.3 [info] The current project is {file:/G:/Git/myproject/}root [info] The current project is built against Scala 2.10.4 [info] Available Plugins: ScctPlugin, sbtrelease.ReleasePlugin, org.scalastyle.sbt.ScalastylePlugin [info] sbt, sbt plugins, and build definitions are using Scala 2.9.2
Java info: G:>java -version java version "1.7.0_67" Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
Git: G:>git --version git version 1.8.3.msysgit.0
Apparently, if you have another branch that has not be pulled down entirely then this problem occurs...
AFAICS, the working directory is also reported as dirty when you have untracked files. Is there a reason for that requirement? If not, I'd be willing to create a PR.
edit: Seems there's already a PR for this (#42) sorry for the noise.