Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -1221,4 +1221,22 @@ lazy val docs = project
.in(file("site-docs"))
.dependsOn(core.jvm)
.enablePlugins(MdocPlugin)
.settings(tlFatalWarnings := { if (tlIsScala3.value) false else tlFatalWarnings.value })
.settings(
tlFatalWarnings := { if (tlIsScala3.value) false else tlFatalWarnings.value },
mdocVariables := {
import scala.sys.process._
val latestVersion = try {
val tags = "git tag --sort=-version:refname".!!.trim.split("\n")
val versionTags = tags.filter(_.matches("v\\d+\\.\\d+\\.\\d+.*"))
if (versionTags.nonEmpty) versionTags.head.drop(1) else version.value
} catch { case _: Exception => version.value }

val latestVersion2x = try {
val tags = "git tag --sort=-version:refname".!!.trim.split("\n")
val version2xTags = tags.filter(_.matches("v2\\.\\d+\\.\\d+.*"))
if (version2xTags.nonEmpty) version2xTags.head.drop(1) else "2.5.5"
} catch { case _: Exception => "2.5.5" }

Map("VERSION_3X" -> latestVersion, "VERSION_2X" -> latestVersion2x)
}
)
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Getting Started
Add the following to your **build.sbt**:

```scala
libraryDependencies += "org.typelevel" %% "cats-effect" % "3.6.3"
libraryDependencies += "org.typelevel" %% "cats-effect" % "@VERSION_3X@"
```

Naturally, if you're using ScalaJS, you should replace the double `%%` with a triple `%%%`. If you're on Scala 2, it is *highly* recommended that you enable the [better-monadic-for](https://github.com/oleg-py/better-monadic-for) plugin, which fixes a number of surprising elements of the `for`-comprehension syntax in the Scala language:
Expand Down
Loading