Skip to content

Commit

Permalink
Publish Doc with Scala 2.13 instead of Scala 2.12 (#2880)
Browse files Browse the repository at this point in the history
* Fix publishing to Sonatype

It seems not possible to publish in parallel to Sonatype, one publish process "closing" the ongoing other ones

See logs in:
- https://github.com/zio/zio-quill/actions/runs/6336694216/job/17211353656
- https://github.com/zio/zio-quill/actions/runs/6336694216/job/17211353055

```bash
2023-09-28 09:39:19.526Z  info [SonatypeClient] Creating a staging repository in profile io.getquill with a description key: [sbt-sonatype] quill 4.7.1  - (SonatypeClient.scala:122)
2023-09-28 09:39:39.873Z  info [SonatypeService] Found a previous staging repository [iogetquill-2462] status:open, profile:io.getquill(4b350f33294246) description: [sbt-sonatype] quill 4.7.1  - (SonatypeService.scala:105)
2023-09-28 09:39:39.873Z  info [SonatypeClient] Dropping staging repository [iogetquill-2462] status:open, profile:io.getquill(4b350f33294246) description: [sbt-sonatype] quill 4.7.1  - (SonatypeClient.scala:225)
```

* Publish Doc with Scala 2.13 instead of Scala 2.12

* Clean
  • Loading branch information
guizmaii authored Sep 28, 2023
1 parent 00d89bd commit e46edb2
Showing 1 changed file with 14 additions and 26 deletions.
40 changes: 14 additions & 26 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,14 @@ lazy val bigdataModules = Seq[sbt.ClasspathDep[sbt.ProjectReference]](
lazy val allModules =
baseModules ++ dbModules ++ jasyncModules ++ codegenModules ++ bigdataModules ++ docsModules

lazy val scala213Modules =
baseModules ++ dbModules ++ codegenModules ++ Seq[sbt.ClasspathDep[sbt.ProjectReference]](
`quill-cassandra`,
`quill-cassandra-alpakka`,
`quill-cassandra-monix`,
`quill-cassandra-zio`,
`quill-orientdb`,
`quill-jasync`,
`quill-jasync-postgres`,
`quill-jasync-mysql`,
`quill-jasync-zio`,
`quill-jasync-zio-postgres`,
`quill-spark`
)
lazy val scala212Modules =
baseModules ++ dbModules ++ jasyncModules ++ codegenModules ++ bigdataModules

lazy val scala3Modules = Seq[sbt.ClasspathDep[sbt.ProjectReference]](`quill-engine`, `quill-util`)

def isScala213 = {
def isScala212 = {
val scalaVersion = sys.props.get("quill.scala.version")
scalaVersion.map(_.startsWith("2.13")).getOrElse(false)
scalaVersion.map(_.startsWith("2.12")).getOrElse(false)
}

def isScala3 = {
Expand Down Expand Up @@ -150,9 +138,9 @@ lazy val filteredModules = {
.map(matchModules)
.flatMap(seq => ListSet(seq: _*))

if (isScala213) {
println("SBT =:> Compiling 2.13 Modules Only")
modules.filter(scala213Modules.contains(_))
if (isScala212) {
println("SBT =:> Compiling 2.12 Modules Only")
modules.filter(scala212Modules.contains(_))
} else if (isScala3) {
println("SBT =:> Compiling 3 Modules Only")
modules.filter(scala3Modules.contains(_))
Expand Down Expand Up @@ -713,13 +701,13 @@ lazy val docs = project
projectName := "ZIO Quill",
mainModuleName := (`quill-core` / moduleName).value,
// With Scala 2.12, these projects doc isn't compiling.
ScalaUnidoc / unidoc / unidocProjectFilter := inAnyProject -- inProjects(
`quill-engine`,
`quill-core`,
`quill-cassandra-monix`,
`quill-orientdb`,
`quill-doobie`
),
//ScalaUnidoc / unidoc / unidocProjectFilter := inAnyProject -- inProjects(
// `quill-engine`,
// `quill-core`,
// `quill-cassandra-monix`,
// `quill-orientdb`,
// `quill-doobie`
//),
projectStage := ProjectStage.ProductionReady,
checkArtifactBuildProcessWorkflowStep := None,
docsPublishBranch := "master",
Expand Down

0 comments on commit e46edb2

Please sign in to comment.