raboof on v1.0.2
raboof on master
Fix invalid .git capture Fixes… Merge pull request #194 from ra… (compare)
git status Error: Could not find or load main class org.eclipse.jgit.pgm.Main [error] Nonzero exit code (1) running JGit.
// NOTE: this will always return 0 until sbt 0.13.1 due to the use of CustomOutput
if(code == 0) result else throw new MessageOnlyException("Nonzero exit code (" + code + ") running JGit.")
"org.eclipse.jgit" % "org.eclipse.jgit" % jgitVersion
SettingKey, it's a
in ThisBuild: https://github.com/sbt/sbt-git/blob/7e380cb63c7741bb42dad37d8f55b2bd917abca3/src/main/scala/com/typesafe/sbt/SbtGit.scala#L152
def useJGit: Setting[_] = gitRunner in ThisBuild := JGitRunner
git statusfrom inside the shell when in
sbt. However, I am confused as to how to use the versioning feature of this plugin. in my
build.sbti have a hardcoded value
version := "1.1.5". I don't want this hardcoded value but rather want it generated from this plugin. Is this possible to do ?
vals in the exported object, let me check it for ya: https://github.com/sbt/sbt-git/blob/master/src/main/scala/com/typesafe/sbt/SbtGit.scala#L14
gitCurrentTagswhich gives you a
git.gitCurrentTagsas a SettingKey
reloadto update those values...
git describewithin a custom sbt task that would have to invoke the corresponding sbt command, provided by the plugin... I did go that path for some things and it's not too pretty, but it should be feasible... the complicated piece with sbt is that you want to call a command (that needs a build state) from a task, which has none. There's a Task already to get the state, but I couldn't yet figure out how to read sbt's logged output for the describe command as something that the task can return as a value...