Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sbt 0.11.3: getting latest version of a git plugin

I've a multi-project structure which builds with sbt 0.11.3. I wanted to centralize my dependency versions, project versions, artifacts, shell prompt stuff and such. It would be really helpful for my plans on release management and version control. So I've created a plugin and put my global configurations there. My projects read it from github and build it as a plugin. Everything is lovely.

./project/project/Build.scala

import sbt._

object PluginDef extends Build {
    override lazy val projects = Seq(root)
    lazy val root = Project("plugins", file(".")) dependsOn(versionPlugin)
    lazy val versionPlugin = uri("git://github.com/config.git") //changed the uri here
}

So sbt fetches the plugins latest version if it haven't been already. Caches that version in ~/.sbt/staging/somehashcode. But I couldn't make it update the project when there are changes in plugin project. I manually go and update it whenever needed. Sadly, in a 20 man team its causing some problems.

How can we make it check for plugin updates?

like image 523
xarion Avatar asked Dec 04 '12 08:12

xarion


Video Answer


1 Answers

I haven't tried this, but the following might work.

refreshing plugin

  1. update to sbt 0.12.1, which fixes update
  2. then from sbt shell:

    > reload plugins
    > update
    > reload return
    

specifying a particular tree

It may be helpful to fix the source dependency to a particular point in time for some situations. If so you can add commit hash or tag as "git://github.com/config.git#hash".

like image 177
Eugene Yokota Avatar answered Oct 12 '22 12:10

Eugene Yokota