sbt 0.11.3:获取最新版本的 git 插件 [英] sbt 0.11.3: getting latest version of a git plugin

查看:38
本文介绍了sbt 0.11.3:获取最新版本的 git 插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 sbt 0.11.3 构建的多项目结构.我想集中我的依赖版本、项目版本、工件、shell 提示等内容.这对我的发布管理和版本控制计划非常有帮助.所以我创建了一个插件并将我的全局配置放在那里.我的项目从 github 读取它并将其构建为插件.一切都很可爱.

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

./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
}

所以 sbt 会获取插件的最新版本(如果它还没有的话).在 ~/.sbt/staging/somehashcode 中缓存该版本.但是当插件项目发生变化时,我无法让它更新项目.我会在需要时手动去更新它.遗憾的是,在一个 20 人的团队中,这会导致一些问题.

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?

推荐答案

我还没有尝试过这个,但以下可能有效.

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

  1. 更新到 sbt 0.12.1,修复了update
  2. 然后来自 sbt shell:

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

> reload plugins
> update
> reload return

指定特定的树

在某些情况下,将源依赖项及时修复到特定时间点可能会有所帮助.如果是这样,您可以添加提交哈希或标记为 "git://github.com/config.git#hash".

这篇关于sbt 0.11.3:获取最新版本的 git 插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆