mirror of https://github.com/sbt/sbt.git
Upgrade to sbt-ghpages 0.6.0
This commit is contained in:
parent
b65dc1830e
commit
55e055fa39
|
|
@ -67,7 +67,7 @@ def testedBaseSettings: Seq[Setting[_]] =
|
||||||
baseSettings ++ testDependencies
|
baseSettings ++ testDependencies
|
||||||
|
|
||||||
lazy val sbtRoot: Project = (project in file("."))
|
lazy val sbtRoot: Project = (project in file("."))
|
||||||
.enablePlugins(ScriptedPlugin, SiteScaladocPlugin)
|
.enablePlugins(ScriptedPlugin, SiteScaladocPlugin, GhpagesPlugin)
|
||||||
.configs(Sxr.sxrConf)
|
.configs(Sxr.sxrConf)
|
||||||
.aggregate(nonRoots: _*)
|
.aggregate(nonRoots: _*)
|
||||||
.settings(
|
.settings(
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
import sbt._
|
import sbt._, Keys._
|
||||||
import Keys._
|
|
||||||
import StatusPlugin.autoImport._
|
import StatusPlugin.autoImport._
|
||||||
import com.typesafe.sbt.site.SitePlugin.autoImport._
|
import com.typesafe.sbt.site.SitePlugin.autoImport._
|
||||||
import com.typesafe.sbt.site.SiteScaladocPlugin.autoImport._
|
import com.typesafe.sbt.site.SiteScaladocPlugin.autoImport._
|
||||||
import com.typesafe.sbt.{ SbtGhPages, SbtGit }
|
import com.typesafe.sbt.sbtghpages.GhpagesPlugin.autoImport._
|
||||||
import SbtGhPages.{ ghpages, GhPagesKeys => ghkeys }
|
import com.typesafe.sbt.SbtGit, SbtGit.{ git, GitKeys }
|
||||||
import SbtGit.{ git, GitKeys }
|
|
||||||
import Sxr.{ sxr, sxrConf }
|
import Sxr.{ sxr, sxrConf }
|
||||||
import SiteMap.Entry
|
|
||||||
|
|
||||||
object Docs {
|
object Docs {
|
||||||
val siteExcludes = Set(".buildinfo", "objects.inv")
|
val siteExcludes = Set(".buildinfo", "objects.inv")
|
||||||
|
|
@ -19,14 +16,14 @@ object Docs {
|
||||||
ghPagesSettings
|
ghPagesSettings
|
||||||
)
|
)
|
||||||
|
|
||||||
def ghPagesSettings = ghpages.settings ++ Seq(
|
def ghPagesSettings = Def settings (
|
||||||
git.remoteRepo := "git@github.com:sbt/sbt.github.com.git",
|
git.remoteRepo := "git@github.com:sbt/sbt.github.com.git",
|
||||||
localRepoDirectory,
|
localRepoDirectory,
|
||||||
ghkeys.synchLocal := synchLocalImpl.value,
|
ghpagesSynchLocal := synchLocalImpl.value,
|
||||||
GitKeys.gitBranch in ghkeys.updatedRepository := Some("master")
|
ghpagesBranch := "master"
|
||||||
)
|
)
|
||||||
|
|
||||||
def localRepoDirectory = ghkeys.repository := {
|
def localRepoDirectory = ghpagesRepository := {
|
||||||
// distinguish between building to update the site or not so that CI jobs
|
// 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
|
// that don't commit+publish don't leave uncommitted changes in the working directory
|
||||||
val status = if (isSnapshot.value) "snapshot" else "public"
|
val status = if (isSnapshot.value) "snapshot" else "public"
|
||||||
|
|
@ -40,11 +37,11 @@ object Docs {
|
||||||
)
|
)
|
||||||
|
|
||||||
def synchLocalImpl = Def task {
|
def synchLocalImpl = Def task {
|
||||||
val repo = ghkeys.updatedRepository.value
|
val repo = ghpagesUpdatedRepository.value
|
||||||
val versioned = repo / version.value
|
val versioned = repo / version.value
|
||||||
IO.delete(versioned / "sxr")
|
IO.delete(versioned / "sxr")
|
||||||
IO.delete(versioned / "api")
|
IO.delete(versioned / "api")
|
||||||
val mappings = ghkeys.privateMappings.value
|
val mappings = ghpagesPrivateMappings.value
|
||||||
val toCopy = for ((file, target) <- mappings if siteInclude(file))
|
val toCopy = for ((file, target) <- mappings if siteInclude(file))
|
||||||
yield (file, versioned / target)
|
yield (file, versioned / target)
|
||||||
IO.copy(toCopy)
|
IO.copy(toCopy)
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ scalacOptions ++= Seq("-feature", "-language:postfixOps")
|
||||||
|
|
||||||
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")
|
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")
|
||||||
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.14")
|
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-git" % "0.9.2")
|
||||||
addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0")
|
addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0")
|
||||||
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.6.8")
|
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.6.8")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue