Skip to content

Commit

Permalink
Use computed latest released version in modules' READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
ruippeixotog committed Nov 1, 2020
1 parent 271f8a5 commit e9b8d8e
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion bundle/docs/README.md
Expand Up @@ -33,7 +33,7 @@ To use PureConfig in an existing SBT project with Scala 2.11 or a later version,
`build.sbt`:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig" % "@VERSION@"
```

For a full example of `build.sbt` you can have a look at this [build.sbt](https://github.com/pureconfig/pureconfig/blob/master/example/build.sbt).
Expand Down
2 changes: 1 addition & 1 deletion modules/akka-http/docs/README.md
Expand Up @@ -9,7 +9,7 @@ for other classes are welcome :)
In addition to [core PureConfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-akka-http" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-akka-http" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/akka/docs/README.md
Expand Up @@ -7,7 +7,7 @@ Adds support for selected [Akka](http://akka.io/) classes to PureConfig.
In addition to [core PureConfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-akka" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-akka" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/cats-effect/docs/README.md
Expand Up @@ -7,7 +7,7 @@ Adds support for loading configuration using [cats-effect](https://github.com/ty
In addition to [core pureconfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-cats-effect" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-cats-effect" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/cats/docs/README.md
Expand Up @@ -9,7 +9,7 @@ classes.
In addition to [core pureconfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-cats" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-cats" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/circe/docs/README.md
Expand Up @@ -7,7 +7,7 @@ Adds support for [Circe](https://circe.github.io/circe/) `Json` to PureConfig.
In addition to [core pureconfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-circe" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-circe" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/cron4s/docs/README.md
Expand Up @@ -8,7 +8,7 @@ Adds support for [Cron4s](https://github.com/alonsodomin/cron4s)'s CronExpr clas
In addition to [core PureConfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-cron4s" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-cron4s" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/enum/docs/README.md
Expand Up @@ -11,7 +11,7 @@ Automatically create a converter to read [enum](https://github.com/julienrf/enum
In addition to [core PureConfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-enum" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-enum" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/enumeratum/docs/README.md
Expand Up @@ -11,7 +11,7 @@ Automatically create a converters to read [Enumeratum](https://github.com/lloydm
In addition to [core PureConfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-enumeratum" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-enumeratum" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/fs2/docs/README.md
Expand Up @@ -7,7 +7,7 @@ Adds support for loading and saving configurations from [fs2](https://github.com
In addition to [core pureconfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-fs2" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-fs2" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/hadoop/docs/README.md
Expand Up @@ -7,7 +7,7 @@ Adds support for selected [Hadoop](http://hadoop.apache.org/) classes to PureCon
In addition to [core PureConfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-hadoop" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-hadoop" % "@VERSION@"
```

Also, `pureconfig-hadoop` depends on `hadoop-common` with `provided` scope. This means that you should explicitly add a dependency on `hadoop-common` or any other Hadoop library which depends on `hadoop-common`. Usually it would be something like this:
Expand Down
2 changes: 1 addition & 1 deletion modules/http4s/docs/README.md
Expand Up @@ -9,7 +9,7 @@ for other classes are welcome :)
In addition to [core PureConfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-http4s" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-http4s" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/javax/docs/README.md
Expand Up @@ -7,7 +7,7 @@ Adds support for selected javax classes to PureConfig.
In addition to [core pureconfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-javax" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-javax" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/joda/docs/README.md
Expand Up @@ -13,7 +13,7 @@ The converters need to be provided a `org.joda.time.format.DateTimeFormatter` to
In addition to [core pureconfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-joda" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-joda" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/magnolia/docs/README.md
Expand Up @@ -12,7 +12,7 @@ configuration using the same [product](https://pureconfig.github.io/docs/overrid
In addition to [core pureconfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-magnolia" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-magnolia" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/scala-xml/docs/README.md
Expand Up @@ -7,7 +7,7 @@ Adds support for XML via [Scala XML](https://github.com/scala/scala-xml) to Pure
In addition to [core pureconfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-scala-xml" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-scala-xml" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/scalaz/docs/README.md
Expand Up @@ -9,7 +9,7 @@ classes.
In addition to [core pureconfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-scalaz" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-scalaz" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/squants/docs/README.md
Expand Up @@ -11,7 +11,7 @@ Automatically create a converter to read [Squants](http://www.squants.com/)'s be
In addition to [core pureconfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-squants" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-squants" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/sttp/docs/README.md
Expand Up @@ -7,7 +7,7 @@ Adds support for [sttp](https://github.com/softwaremill/sttp). Currently support
In addition to [core PureConfig](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-sttp" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-sttp" % "@VERSION@"
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion modules/yaml/docs/README.md
Expand Up @@ -8,7 +8,7 @@ of `ConfigReader`s and hints to read configurations to domain objects without bo
In addition to the [PureConfig core](https://github.com/pureconfig/pureconfig), you'll need:

```scala
libraryDependencies += "com.github.pureconfig" %% "pureconfig-yaml" % "0.14.0"
libraryDependencies += "com.github.pureconfig" %% "pureconfig-yaml" % "@VERSION@"
```

## Example
Expand Down
7 changes: 6 additions & 1 deletion project/ModuleMdocPlugin.scala
Expand Up @@ -46,7 +46,7 @@ object ModuleMdocPlugin extends AutoPlugin {
mdocIn := (mdocIn in moduleProj).value,
mdocOut := (mdocOut in moduleProj).value,
mdocExtraArguments += "--no-link-hygiene",
mdocVariables := Map("VERSION" -> version.value),
mdocVariables := Map("VERSION" -> latestPureconfigRelease),

libraryDependencies ++= (mdocLibraryDependencies in moduleProj).value,
scalacOptions ++= (mdocScalacOptions in moduleProj).value,
Expand All @@ -57,4 +57,9 @@ object ModuleMdocPlugin extends AutoPlugin {

List(docProj)
}

val changelogVersionRegex = "^### ([^\\s]+)".r

lazy val latestPureconfigRelease: String =
IO.readLines(file("CHANGELOG.md")).flatMap(changelogVersionRegex.findFirstMatchIn).head.group(1)
}

0 comments on commit e9b8d8e

Please sign in to comment.