Skip to content

Commit

Permalink
Allow deployRsync for publishing snapshot docs (#2821)
Browse files Browse the repository at this point in the history
  • Loading branch information
raboof authored Nov 20, 2019
1 parent eeb404c commit fbcd94f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ lazy val root = Project(
// We currently expect the java documentation at akka-http/target/javaunidoc, so
// the following heuristic is hopefully good enough to determine which one is the Java and
// which one the Scala version.

// This will fail with a MatchError when -Dakka.genjavadoc.enabled is not set
val (Seq(java), Seq(scala)) = unidocArtifacts.partition(_.getName contains "java")

Seq(
scala -> s"www/api/akka-http/${version.value}",
java -> s"www/japi/akka-http/${version.value}")
scala -> gustavDir("api").value,
java -> gustavDir("japi").value)
}
)
.aggregate(
Expand Down Expand Up @@ -173,6 +175,13 @@ lazy val http = project("akka-http")
.settings(scalaMacroSupport)
.enablePlugins(BootstrapGenjavadoc, BoilerplatePlugin)

def gustavDir(kind: String) = Def.task {
val ver =
if (isSnapshot.value) "snapshot"
else version.value
s"www/$kind/akka-http/$ver"
}

lazy val http2Support = project("akka-http2-support")
.settings(commonSettings)
.settings(AutomaticModuleName.settings("akka.http.http2"))
Expand Down Expand Up @@ -366,7 +375,7 @@ lazy val docs = project("docs")
apidocRootPackage := "akka",
Formatting.docFormatSettings,
additionalTasks in ValidatePR += paradox in Compile,
deployRsyncArtifact := List((paradox in Compile).value -> s"www/docs/akka-http/${version.value}"),
deployRsyncArtifact := List((paradox in Compile).value -> gustavDir("docs").value),
add212CrossDirs(Test)
)
.settings(ParadoxSupport.paradoxWithCustomDirectives)
Expand Down

0 comments on commit fbcd94f

Please sign in to comment.