sbt-release icon indicating copy to clipboard operation
sbt-release copied to clipboard

Release fails dirty working directory

Open Christewart opened this issue 10 years ago • 2 comments

[info] Set current project to scalacoin (in build file:/home/chris/dev/scalacoin/) 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:125) at sbtrelease.ReleaseStateTransformations$$anonfun$initialVcsChecks$1.apply(ReleaseExtra.scala:122) at sbtrelease.ReleasePlugin$autoImport$ReleaseKeys$$anonfun$2$$anonfun$apply$4.apply(ReleasePlugin.scala:140) at sbtrelease.ReleasePlugin$autoImport$ReleaseKeys$$anonfun$2$$anonfun$apply$4.apply(ReleasePlugin.scala:140) at scala.collection.immutable.List.foreach(List.scala:318) at sbtrelease.ReleasePlugin$autoImport$ReleaseKeys$$anonfun$2.apply(ReleasePlugin.scala:140) at sbtrelease.ReleasePlugin$autoImport$ReleaseKeys$$anonfun$2.apply(ReleasePlugin.scala:108) 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.

I think this is because I have untracked files. When I do git status I get

Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits)

Untracked files: (use "git add ..." to include in what will be committed)

.idea/
build.sbt
project/
src/main/scala/org/scalacoin/util/

I was reading another issue ticket and it said that I need to ignore these untracked files, but I was unsure of where I need to put the piece of code that is required to ignore these files. Is it inside of my Build.scala file, my version.sbt file?

Christewart avatar Jul 28 '15 18:07 Christewart

Add the files/directories to ignore in your .gitignore file (and commit that .gitignore file)

raboof avatar Sep 17 '15 10:09 raboof

Looks like #42 adds an option to allow releasing even when there are untracked files (though IMHO it's better to add them to .gitignore :) )

raboof avatar Sep 17 '15 10:09 raboof