sbt / sbt-git Goto Github PK
View Code? Open in Web Editor NEWA git plugin for sbt
License: BSD 2-Clause "Simplified" License
A git plugin for sbt
License: BSD 2-Clause "Simplified" License
[error] /Users/bchazalet/development/code/sbt-git/project/bintray.scala:33: not found: value dispatch
[error] import dispatch.classic._
[error] ^
[error] /Users/bchazalet/development/code/sbt-git/project/bintray.scala:35: not found: value Http
[error] Http(url(uri).POST.as(u,p).>|)
[error] ^
[error] two errors found
error Compilation failed
Would be great to have this in Maven Central:
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
With a git base version at 0.1in a new repository with one commit
I expect the version to be 0.1-xxxxxxxxxx where xxxxxxxxxx is the sha1 of the commit
If I tag the commit v1.0.0,
I expect the version to be 1.0.0
If I add a file without committing,
I expect the version to be 1.0.0-SNAPSHOT
If I commit the newly added file (and get the new sha1 yyyyyyyy)
I expect the version to be 1.0.0-yyyyyyyy or 1.0.0-yyyyyyy-SNAPSHOT
This fails and reverts back to 0.1-yyyyyyyy
Following is an sbt-test test case for the issue , it fails on line 25 with a version which has reverted to 0.1-yyyyyyyy instead of 1.0.0-yyyyyyyy or 1.0.0-yyyyyyyy-SNAPSHOT or maybe 1.0.0-SNAPSHOT
git init
git config user.email "[email protected]"
git config user.name "Tester"
git add README.md
git commit -m "test"
$ copy-file changes/build.sbt build.sbt
reload
inspect version
checkVersionStartsWith 0.1
git add build.sbt
git commit -m"v1.0.0"
git tag v1.0.0
reload
inspect version
checkVersion 1.0.0
$ copy-file changes/change1.txt change1.txt
git add change1.txt
reload
inspect version
checkVersionStartsWith 1.0.0
checkSnapshotVersion
git commit -m"v1.0.1"
reload
inspect version
checkVersionStartsWith 1.0.0
Hi,
It's possible to get the short commit instead of the full commit?
Following the directions on the README and launching sbt (0.11.1), I get the following error:
[error] {file:/Users/peter/.sbt/plugins/}default-577483/*:update: sbt.ResolveException: unresolved dependency: org.eclipse.jgit#org.eclipse.jgit.pgm;1.1.0.201109151100-r: not found
This is a usage issue, and ideally will add a section to the README. How do I access the HEAD commit hash? I tried git.gitHeadCommit
but that prints out sbt.Scoped$$anon$1@1db4b415
. I'm a Scala n00b which is likely half of the problem, but a concrete example would help.
Hi there,
Here is one I have:
optimus(sbt2)> git status
Error: Could not find or load main class org.eclipse.jgit.pgm.Main
[info]
java.lang.RuntimeException: Nonzero exit code (1) running JGit.
at scala.sys.package$.error(package.scala:27)
at scala.Predef$.error(Predef.scala:142)
at com.typesafe.sbt.git.JGitRunner$.forkJGitMain(JGitRunner.scala:69)
at com.typesafe.sbt.git.JGitRunner$.apply(JGitRunner.scala:16)
at com.typesafe.sbt.SbtGit$GitCommand$$anonfun$1.apply(SbtGit.scala:49)
at com.typesafe.sbt.SbtGit$GitCommand$$anonfun$1.apply(SbtGit.scala:45)
at com.typesafe.sbt.SbtGit$GitCommand$$anonfun$3.apply(SbtGit.scala:56)
at com.typesafe.sbt.SbtGit$GitCommand$$anonfun$3.apply(SbtGit.scala:54)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:59)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:59)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:61)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:61)
at sbt.Command$.process(Command.scala:93)
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] Nonzero exit code (1) running JGit.
[error] Use 'last' for the full log.
optimus(sbt2)>
git.sbt
at the root of the project that contains:
useJGit
plugins.sbt
that contains:
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5")
build.sbt
that contains:
enablePlugins(GitBranchPrompt)
Cheers
Hello,
At my company, we are running continuous deployment, and as such, deploy on each commit. Since this is the case, we use the git commit SHA as the actual version itself. This plugin is perfect for that, but it prepends a 1.0- to the git commit sha. You can override it by specifying git.baseVersion := "XYZ"
, but it's impossible to have nothing at all.
Obviously I'm being finicky here, but it's driving my OCD brain crazy! It would be great if there was a way to exclude the base version.
This example is motivated by sbt/sbt-eclipse#262
Steps to re-create:
Create a tag in git (in this case 4.0.0-RC1)
From master:
~/t/sbteclipse (master=) sbt-0.13
[info] Loading global plugins from /home/jim/.sbt/0.13/plugins
[info] Loading project definition from /home/jim/typesafe/sbteclipse/project
[info] Set current project to sbteclipse (in build file:/home/jim/typesafe/sbteclipse/)
> git status
[info] On branch master
[info] Your branch is up-to-date with 'origin/master'.
[info] nothing to commit, working directory clean
> show version
[info] sbteclipse-core/*:version
[info] 4.0.0-RC1
[info] sbteclipse-plugin/*:version
[info] 4.0.0-RC1
[info] sbteclipse/*:version
[info] 4.0.0-RC1
Now, make a simple whitespace change
~/t/sbteclipse (master :zap:=) sbt-0.13
[info] Loading global plugins from /home/jim/.sbt/0.13/plugins
[info] Loading project definition from /home/jim/typesafe/sbteclipse/project
[info] Compiling 1 Scala source to /home/jim/typesafe/sbteclipse/project/target/scala-2.10/sbt-0.13/classes...
[info] Set current project to sbteclipse (in build file:/home/jim/typesafe/sbteclipse/)
> git status
[info] On branch master
[info] Your branch is up-to-date with 'origin/master'.
[info] Changes not staged for commit:
[info] (use "git add <file>..." to update what will be committed)
[info] (use "git checkout -- <file>..." to discard changes in working directory)
[info]
[info] modified: project/Build.scala
[info]
[info] no changes added to commit (use "git add" and/or "git commit -a")
> show version
[info] sbteclipse-core/*:version
[info] 4.0.0-RC1 <<< This *should* now be something like 4.0.0-<SHA>-SNAPSHOT
[info] sbteclipse-plugin/*:version
[info] 4.0.0-RC1 <<< This *should* now be something like 4.0.0-<SHA>-SNAPSHOT
[info] sbteclipse/*:version
[info] 4.0.0-RC1 <<< This *should* now be something like 4.0.0-<SHA>-SNAPSHOT
Now, check-in that change on another branch
~/t/sbteclipse (git-testing :zap:) sbt-0.13
[info] Loading global plugins from /home/jim/.sbt/0.13/plugins
[info] Loading project definition from /home/jim/typesafe/sbteclipse/project
[info] Set current project to sbteclipse (in build file:/home/jim/typesafe/sbteclipse/)
> git status
[info] On branch git-testing
[info] nothing to commit, working directory clean
> show version
[info] sbteclipse-core/*:version
[info] 4.0.0-6e43f3b8c01c5fbe198d370169b597d0fef4490f
[info] sbteclipse-plugin/*:version
[info] 4.0.0-6e43f3b8c01c5fbe198d370169b597d0fef4490f
[info] sbteclipse/*:version
[info] 4.0.0-6e43f3b8c01c5fbe198d370169b597d0fef4490f
Now make a simple change to any source without checking it in
~/t/sbteclipse (git-testing :zap:) sbt-0.13
[info] Loading global plugins from /home/jim/.sbt/0.13/plugins
[info] Loading project definition from /home/jim/typesafe/sbteclipse/project
[info] Compiling 1 Scala source to /home/jim/typesafe/sbteclipse/project/target/scala-2.10/sbt-0.13/classes...
[info] Set current project to sbteclipse (in build file:/home/jim/typesafe/sbteclipse/)
> git status
[info] On branch git-testing
[info] Changes not staged for commit:
[info] (use "git add <file>..." to update what will be committed)
[info] (use "git checkout -- <file>..." to discard changes in working directory)
[info]
[info] modified: project/Build.scala
[info]
[info] no changes added to commit (use "git add" and/or "git commit -a")
> show version
[info] sbteclipse-core/*:version
[info] 4.0.0-6e43f3b8c01c5fbe198d370169b597d0fef4490f-SNAPSHOT
[info] sbteclipse-plugin/*:version
[info] 4.0.0-6e43f3b8c01c5fbe198d370169b597d0fef4490f-SNAPSHOT
[info] sbteclipse/*:version
[info] 4.0.0-6e43f3b8c01c5fbe198d370169b597d0fef4490f-SNAPSHOT
It's duplicated output from git:
I've ~/.sbt/0.13/plugins/plugins.sbt
resolvers ++= Seq(
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
"jgit-repo" at "http://download.eclipse.org/jgit/maven")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.6.2")
ant output from example git command:
$ sbt
Loading /usr/share/sbt/bin/sbt-launch-lib.bash
[info] Loading global plugins from /home/mateusz/.sbt/0.13/plugins
[info] Loading project definition from /home/mateusz/workspaces/scala-workspaces/moje_projekciki/PDFGen/project
[info] Set current project to hello (in build file:/home/mateusz/workspaces/scala-workspaces/moje_projekciki/PDFGen/)
git
[info] usage: git [--version] [--help] [-C ] [-c name=value]
[info] [--exec-path[=]] [--html-path] [--man-path] [--info-path]
[info] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[info] [--git-dir=] [--work-tree=] [--namespace=]
[info] []
[info]
[info] The most commonly used git commands are:
[info] add Add file contents to the index
[info] bisect Find by binary search the change that introduced a bug
[info] branch List, create, or delete branches
[info] checkout Checkout a branch or paths to the working tree
[info] clone Clone a repository into a new directory
[info] commit Record changes to the repository
[info] diff Show changes between commits, commit and working tree, etc
[info] fetch Download objects and refs from another repository
[info] grep Print lines matching a pattern
[info] init Create an empty Git repository or reinitialize an existing one
[info] log Show commit logs
[info] merge Join two or more development histories together
[info] mv Move or rename a file, a directory, or a symlink
[info] pull Fetch from and integrate with another repository or a local branch
[info] push Update remote refs along with associated objects
[info] rebase Forward-port local commits to the updated upstream head
[info] reset Reset current HEAD to the specified state
[info] rm Remove files from the working tree and from the index
[info] show Show various types of objects
[info] status Show the working tree status
[info] tag Create, list, delete or verify a tag object signed with GPG
[info]
[info] 'git help -a' and 'git help -g' lists available subcommands and some
[info] concept guides. See 'git help ' or 'git help '
[info] to read about a specific subcommand or concept.
usage: git [--version] [--help] [-C ] [-c name=value]
[--exec-path[=]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=] [--work-tree=] [--namespace=]
[]
The most commonly used git commands are:
add Add file contents to the index
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
checkout Checkout a branch or paths to the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
grep Print lines matching a pattern
init Create an empty Git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
rebase Forward-port local commits to the updated upstream head
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
show Show various types of objects
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG
'git help -a' and 'git help -g' lists available subcommands and some
concept guides. See 'git help ' or 'git help '
to read about a specific subcommand or concept.
git$ sbt-0.13
...
[error] Setting value cannot be null: {file:/Users/heiko/tmp/git/}/*:gitCurrentBranch
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
Hey Josh -
Any plans to cross-build against 2.9.1-1. We're on that version of Scala due to some Java interop issues with 2.9.1 I built the Git plugin internally and we can use that, but I didn't know if it might be useful to others to have an official binary. Thanks!
The project title on github calls it GIT, suggesting that it's an acronym. Should probably just be "git" or "Git".
Trying to figure out how to use GitVersioning
during my git-flow
-structured release process. Having an outline of example release process using GitVersioning
would be helpful in bridging that gap.
In my specific case, trying to reconcile deriving version numbers from branch names vs. tag names, and if the publishing the release happens before or after the the release branch is merged onto master.
Even though this is a relatively small plug-in in comparison to others, it would be nice to have some means beyond GitHub Issues to communicate with plug-in contributors.
I tend to work in an interactive sbt console, however, this does not regenerate the version number unless you reload.
Is there a way to have these regenerated whenever a task is run?
The example:
git.formattedShaVersion := git.gitHeadCommit map { sha => s"v$sha" }
should be:
git.formattedShaVersion := git.gitHeadCommit.value map { sha => s"v$sha" }
Otherwise you get a type error.
The maven repo linked from the project description no longer seems to work:
resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"
The default version-property override should not be 'project.version', as many build systems provide that property out of the box and out of the control of the user.
If you do not specify your own override in your project sbt file you can end up in a nasty situation where sbt-git insists on version-property='project.version' overriding all other versioning strategies, and your build system insisting on providing project.version=48 etc.
I suggest version-property should be an Option. It's an override so by definition it's optional. If it is not specified, the override strategy should be ignored entirely.
Hello, In some cases console command git status
and call porcelain.status.call.hasUncommittedChanges
(with JGit 3.7 used in sbt-git) returns different results.
I observed it on renaming files (changing character registry in mac os x case insensitive hfs+) and when using symlinks.
These cases influence -SNAPSHOT suffix and I think git status
is more correct.
I'd suppose to use your ConsoleGitRunner
for implementing hasUncommittedChanges
method in GitReadonlyInterface
(running git status --porcelain
command)
Setting git.baseVersion seems just ignored on SBT 0.12.0/0.13.0:
$ cat version.sbt
git.baseVersion := "0.1"
versionWithGit
$ sbt
[info] Loading global plugins from /Users/pgiarrusso/.sbt/0.13/plugins
[info] Loading project definition from /Users/pgiarrusso/Movies/subtitle-fixer/project
[info] Set current project to subtitle-fixer (in build file:/Users/pgiarrusso/Movies/subtitle-fixer/)
> version
[info] 1.0-0cbac39bc67f401c58ccd4bc85617e019793c184
What seems to take effect is the setting of the version to 1.0 in sbt-git's code:
baseVersion in ThisBuild := "1.0",
Example: https://travis-ci.org/scalaz/scalaz-stream/jobs/60127015
Any idea how I can convince sbt-git that Git is in fact installed on Travis? JGit basically doesn't work.
I'd love getting rid of the build.sbt
configuration step whatsoever by migrating the plugin to use auto-plugin feature available since sbt 0.13.5.
Quoting the official documentation of sbt:
sbt 0.13.5 intoduces auto plugin with improved dependency management among the plugins and explicitly scoped auto importing. Going forward, our recommendation is to migrate to the auto plugins.
The last sentence makes the migration highly welcome.
@jsuereth the readme says enablePlugins(GitVersioning)
is needed, but I think that's wrong since it's an AutoPlugin?
Git has nice tab completion support (e.g. on git checkout [branchname], half-entering the branch name).
This won't be easy, tab completion seems to be configured by bash scripts (/usr/lib/git-core/git-sh-prompt in ubuntu).
but this is what sbt looks for:
http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/com/jsuereth/sbt-git-plugin_2.9.1_0.11.1/0.1/sbt-git-plugin-0.1.pom
best,
ido
Upgrade to the latest version of sbt 0.13.7 or whatever is the latest at the time of the upgrade (it appears days yet till 0.13.8
hits the shelves)
The versionning with git does not work if sbt base directory does not contain the .git directory.
I have a repo with the following folders:
my-project
|-- code
|-- build.sbt
|-- src
|-- .git
See the results of the following commands:
[bloomberg-update-service] $ show version
[info] 1.0.3-20140812T140719
[bloomberg-update-service] $ show gitCurrentBranch
[info]
[bloomberg-update-service] $ show gitHeadCommit
[info] None
Note that git console works even if I force the use of JGit, i.e. JGit can find that the .git folder is one folder up.
[bloomberg-update-service] $ set useJGit
[bloomberg-update-service] $ git status
[info] # On branch master
...
> git commit -m "gulp html test"
[error] Expected whitespace character
[error] Expected non-double-quote-space character
[error] git commit -m "gulp html test"
[error]
Would it be possible to add an additional signifier, such as -SNAPSHOT
to the end of a version number to signify there are uncommitted changes?
error com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK plugin.properties
[error] File 1: C:\Users\pfnguyen.ivy2\cache\org.eclipse.jgit\org.eclipse.jgit\jars\org.eclipse.jgit-2.2.0.201212191850-r.jar
[error] File 2: C:\Users\pfnguyen.ivy2\cache\org.eclipse.jgit\org.eclipse.jgit\jars\org.eclipse.jgit-2.2.0.201212191850-r.jar
[error] Total time: 17 s, completed May 2, 2014 7:00:42 AM
sbt> show dependency-classpath
[info] ...elided..., Attributed(C:\Users\pfnguyen.ivy2\cache\scala_2.9.2\sbt_0.12\com.typesafe.sbt\sbt-git\jars\sbt-git-0.6.2.jar), Attributed(C:\Users\pfnguyen.ivy2\cache\org.eclipse.jgit\org.eclipse.jgit.pgm\jars\org.eclipse.jgit.pgm-2.2.0.201212191850-r.jar), Attributed(C:\Users\pfnguyen.ivy2\cache\args4j\args4j\jars\args4j-2.0.12.jar), Attributed(C:\Users\pfnguyen.ivy2\cache\org.apache.commons\commons-compress\jars\commons-compress-1.3.jar), Attributed(C:\Users\pfnguyen.ivy2\cache\org.eclipse.jgit\org.eclipse.jgit\jars\org.eclipse.jgit-2.2.0.201212191850-r.jar), Attributed(C:\Users\pfnguyen.ivy2\cache\com.jcraft\jsch\jars\jsch-0.1.44-1.jar), Attributed(C:\Users\pfnguyen.ivy2\cache\org.eclipse.jgit\org.eclipse.jgit.iplog\jars\org.eclipse.jgit.iplog-2.2.0.201212191850-r.jar), Attributed(C:\Users\pfnguyen.ivy2\cache\org.eclipse.jgit\org.eclipse.jgit.ui\jars\org.eclipse.jgit.ui-2.2.0.201212191850-r.jar) ...
[success] Total time: 0 s, completed May 2, 2014 7:01:02 AM
Would it be ok to have a fallback version
, like when useGitDescribe := false
?
See workaround for details: retronym/scala-dist@e1e605d
I am trying to understand the rules used by sbt-git to build a version. If I make a tag at the present commit "v5.0.0" then sbt version
shows the version to be 5.0.0
. If I then make a new commit, sbt version
shows the version to be 1.0-77c7b821e9450c17c9e1c43861cbca3e5feddd46
. Shouldn't it be 5.0.0-77c7b821e9450c17c9e1c43861cbca3e5feddd46
? Where is the 1.0
coming from?
When I have git.useGitDescribe set to true I noticed the following:
Shouldn't this be '0.8.0-1-gbeea47d'?
I downloaded nscala-time-master yesterday and got the above error for gitCurrentBranch.
Then I downloaded most-current sbt, and still get error.
Syntax in docs seems wrong. Docs say:
addSbtPlugin("com.jsuereth", "sbt-git-plugin", "0.1")
Should it not be instead:
addSbtPlugin("com.jsuereth" % "sbt-git-plugin" % "0.1")
I with the latter, I get:
sbt.ResolveException: unresolved dependency: com.jsuereth#sbt-git-plugin;0.1: not found
I found the plugin at http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/com.jsuereth/sbt-git-plugin/scala_2.9.1/sbt_0.11.1/0.1/
If there is no current tag for the build, then sbt-git should set isSnapshot to true, or at least provide an option to do that, so that builds that publish nightlies to a snapshot repository still work.
I've been really impressed by the colouring added to sbt-revolver recently. It would be nice if I could have my git colouring from within sbt.
Using git describe when there are uncommited changes uncommittedSuffix is not attached on version.
Example:
git init
git commit -m "First commit"
git tag v1.0
reload
version
1.0
touch README.md
reload
version
1.0-SNAPSHOT (Uncommited README.md)
git add README.md
git commit "Second commit with README.md"
reload
version
v1.0-1-gc136ac1
touch README2.md
reload
version
v1.0-1-gc136ac1 (Uncommited README2.md)
Wouldn't it make sense to return v1.0-1-gc136ac1-SNAPSHOT?
This is also happening to my colleagues. I always get null as branch name.
I have added showCurrentGitBranch
in the build.sbt file and when I execute sbt
I get:
myproject(null)> %
What could it be the cause?
I am trying to set the project version from git using sbt-git and my settings are as follows...
lazy val special = project.in(file("."))
.settings(commonSettings: _*)
.enablePlugins(GitVersioning, GitBranchPrompt)
.settings(
git.gitTagToVersionNumber := { tag: String =>
Some("special_tag")
}
)
The output of 'git tag' is 'v0.9.9' so you would think that my version would be set to "special_tag" but it's not, it gets set to the last SHA1 postpended with "SNAPSHOT". It's as if sbt-git is not paying attention to the existing tags at all. I can verify this by running 'sbt -jvm-debug' and setting a breakpoint at line 118 in SbtGit.scala:
118: gitCurrentTags := gitReader.value.withGit(_.currentTags),
If I put a watch on gitReader.value and step into this function, I can clearly see a "not implemented" exception being thrown. Is this a known issue? The documentation on the readme seems to imply that this is supposed to work. Any insight?
Warnings are printed:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Should we write a SLF4J backend for sbt?
Hi,
when I commit with
git commit -a -m "space in the message"
I get
[error] fatal: Paths with -a does not make sense.
[error] Nonzero exit value: 128
[error] Use 'last' for the full log.
PS: you publish 0.5-SNAPHOST
when I put the plugin in my ~/.sbt/plugins/plugins.sbt file and I put useJGit in ~/.sbt/user.sbt
I get the following error:
[error] AttributeKey ID collisions detected for: 'git-runner' (sbt.Task[com.jsuereth.git.GitRunner], sbt.Task[com.jsuereth.git.GitRunner], sbt.Task[com.jsuereth.git.GitRunner])
It is being used in a project that has many references to other projects on the filesystem, I have no idea what that error means or how I should start resolving it.
in a project with multiple (aggregated) subprojects, every git command gets executed once per subproject, but in the same directory. the output lines of those multiple excecutions of the same command get interleaved. i'd expect the command to be run just once in the parent project.
considering a sbt multi project Root (project created using repo
):
root/
build.sbt
a/
.git/
some_a_file
b/
.git/
some_b_file
Since, gitReader
is defined under ThisBuild
. All the projects share the same gitReader
, which's baseDirectory
is root/
. And it can not find the valid git repo for project a
, neither for b
.
The same for a project constructed with multiple sub project using git submodule add <sub_project_repo_url> sub_project_name
Gives me this error:
[info] Loading project definition from /home/dcs/github/scala/project/plugins/project
[info] Loading project definition from /home/dcs/github/scala/project/plugins
[info] Compiling 7 Scala sources to /home/dcs/github/scala/project/target/scala_2.9.1/classes...
[error] /home/dcs/github/scala/project/Release.scala:110: value split is not a member of Unit
[error] git("--no-pager", "log", "--pretty=oneline", mergeBase +"..HEAD")(baseDirectory, s.log) split "[\r\n]+" size
[error] ^
[error] /home/dcs/github/scala/project/Release.scala:112: value substring is not a member of Unit
[error] "rdev-%d-%s-g%s" format (commits, date, sha.substring(0,7))
[error] ^
[error] two errors found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.