Fix README validation, run tut on CI

This commit is contained in:
Alexandre Archambault 2016-07-24 14:32:36 +02:00
parent 22c7340f6f
commit 39e6f5dfb4
No known key found for this signature in database
GPG Key ID: 14640A6839C263A9
3 changed files with 9 additions and 4 deletions

View File

@ -48,7 +48,7 @@ if echo "$TRAVIS_SCALA_VERSION" | grep -q "^2\.10"; then
SBT_COMMANDS="$SBT_COMMANDS plugin/scripted"
fi
SBT_COMMANDS="$SBT_COMMANDS coreJVM/mimaReportBinaryIssues cache/mimaReportBinaryIssues"
SBT_COMMANDS="$SBT_COMMANDS tut coreJVM/mimaReportBinaryIssues cache/mimaReportBinaryIssues"
if isNotPr && publish && isMaster; then
SBT_COMMANDS="$SBT_COMMANDS publish"

View File

@ -447,7 +447,7 @@ scala> val repositories = Seq(
| Cache.ivy2Local,
| MavenRepository("https://repo1.maven.org/maven2")
| )
repositories: Seq[coursier.core.Repository] = List(IvyRepository(file://${user.home}/.ivy2/local/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext],None,None,Map(),true,true,true,true,None), MavenRepository(https://repo1.maven.org/maven2,None,false,None))
repositories: Seq[coursier.core.Repository] = List(IvyRepository(Pattern(List(Const(file://), Var(user.home), Const(/local/), Var(organisation), Const(/), Var(module), Const(/), Opt(WrappedArray(Const(scala_), Var(scalaVersion), Const(/))), Opt(WrappedArray(Const(sbt_), Var(sbtVersion), Const(/))), Var(revision), Const(/), Var(type), Const(s/), Var(artifact), Opt(WrappedArray(Const(-), Var(classifier))), Const(.), Var(ext))),None,None,true,true,true,true,None), MavenRepository(https://repo1.maven.org/maven2,None,false,None))
```
The first one, `Cache.ivy2Local`, is defined in `coursier.Cache`, itself from the `coursier-cache` module that
we added above. As we can see, it is an `IvyRepository`, picking things under `~/.ivy2/local`. An `IvyRepository`

View File

@ -135,8 +135,13 @@ object Cache {
// but it would then have required properties, which would have cluttered
// output here.
val ivy2Local = coursier.Cache.ivy2Local.copy(
pattern = coursier.Cache.ivy2Local.pattern.replace("file:" + sys.props("user.home"), "file://${user.home}")
import coursier.ivy.Pattern.Chunk, Chunk._
val ivy2Local = coursier.ivy.IvyRepository.fromPattern(
coursier.ivy.Pattern(
Seq[Chunk]("file://", Var("user.home"), "/local/") ++ coursier.ivy.Pattern.default.chunks
),
dropInfoAttributes = true
)
def fetch() = coursier.Cache.fetch()