From 55e055fa3966bd7fe8f61e028e637e80314fd6d9 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Mon, 8 May 2017 14:46:29 +0100 Subject: [PATCH] Upgrade to sbt-ghpages 0.6.0 --- build.sbt | 2 +- project/Docs.scala | 21 +++++++++------------ project/plugins.sbt | 2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/build.sbt b/build.sbt index 7bcace179..071b73a9a 100644 --- a/build.sbt +++ b/build.sbt @@ -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( diff --git a/project/Docs.scala b/project/Docs.scala index 2db6636fd..11410185a 100644 --- a/project/Docs.scala +++ b/project/Docs.scala @@ -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) diff --git a/project/plugins.sbt b/project/plugins.sbt index 9e7329162..8d51f7bb3 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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")