Upgrade to sbt-ghpages 0.6.0

This commit is contained in:
Dale Wijnand 2017-05-08 14:46:29 +01:00
parent b65dc1830e
commit 55e055fa39
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
3 changed files with 11 additions and 14 deletions

View File

@ -67,7 +67,7 @@ def testedBaseSettings: Seq[Setting[_]] =
baseSettings ++ testDependencies
lazy val sbtRoot: Project = (project in file("."))
.enablePlugins(ScriptedPlugin, SiteScaladocPlugin)
.enablePlugins(ScriptedPlugin, SiteScaladocPlugin, GhpagesPlugin)
.configs(Sxr.sxrConf)
.aggregate(nonRoots: _*)
.settings(

View File

@ -1,13 +1,10 @@
import sbt._
import Keys._
import sbt._, Keys._
import StatusPlugin.autoImport._
import com.typesafe.sbt.site.SitePlugin.autoImport._
import com.typesafe.sbt.site.SiteScaladocPlugin.autoImport._
import com.typesafe.sbt.{ SbtGhPages, SbtGit }
import SbtGhPages.{ ghpages, GhPagesKeys => ghkeys }
import SbtGit.{ git, GitKeys }
import com.typesafe.sbt.sbtghpages.GhpagesPlugin.autoImport._
import com.typesafe.sbt.SbtGit, SbtGit.{ git, GitKeys }
import Sxr.{ sxr, sxrConf }
import SiteMap.Entry
object Docs {
val siteExcludes = Set(".buildinfo", "objects.inv")
@ -19,14 +16,14 @@ object Docs {
ghPagesSettings
)
def ghPagesSettings = ghpages.settings ++ Seq(
def ghPagesSettings = Def settings (
git.remoteRepo := "git@github.com:sbt/sbt.github.com.git",
localRepoDirectory,
ghkeys.synchLocal := synchLocalImpl.value,
GitKeys.gitBranch in ghkeys.updatedRepository := Some("master")
ghpagesSynchLocal := synchLocalImpl.value,
ghpagesBranch := "master"
)
def localRepoDirectory = ghkeys.repository := {
def localRepoDirectory = ghpagesRepository := {
// distinguish between building to update the site or not so that CI jobs
// that don't commit+publish don't leave uncommitted changes in the working directory
val status = if (isSnapshot.value) "snapshot" else "public"
@ -40,11 +37,11 @@ object Docs {
)
def synchLocalImpl = Def task {
val repo = ghkeys.updatedRepository.value
val repo = ghpagesUpdatedRepository.value
val versioned = repo / version.value
IO.delete(versioned / "sxr")
IO.delete(versioned / "api")
val mappings = ghkeys.privateMappings.value
val mappings = ghpagesPrivateMappings.value
val toCopy = for ((file, target) <- mappings if siteInclude(file))
yield (file, versioned / target)
IO.copy(toCopy)

View File

@ -3,7 +3,7 @@ scalacOptions ++= Seq("-feature", "-language:postfixOps")
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.14")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0")
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.6.8")