Skip to content

Commit

Permalink
Merge pull request #306 from lichess-org/add-sbt-release-plugin
Browse files Browse the repository at this point in the history
Add sbt release plugin
  • Loading branch information
lenguyenthanh authored Sep 8, 2024
2 parents 1b80021 + cf63577 commit 7387a19
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ Start ingestor cli tool
```sh
ingestor/runMain lila.search.ingestor.cli --help
```

### release

```bash
sbt release with-defaults
```
1 change: 0 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ inThisBuild(
Seq(
scalaVersion := "3.5.0",
versionScheme := Some("early-semver"),
version := "3.0.0",
organization := "org.lichess.search",
run / fork := true,
run / javaOptions += "-Dconfig.override_with_env_vars=true",
Expand Down
30 changes: 30 additions & 0 deletions project/BuildPlugin.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import sbt._, Keys._
import sbt.ScriptedPlugin.autoImport._
import sbtrelease.ReleasePlugin, ReleasePlugin.autoImport._, ReleaseTransformations._, ReleaseKeys._
import sbt.ScriptedPlugin.autoImport._

import sbt.plugins.{JvmPlugin, SbtPlugin}

object BuildPlugin extends AutoPlugin {
override def trigger = allRequirements

override def requires = ReleasePlugin

override lazy val projectSettings = releaseSettings

def releaseSettings: Seq[Setting[_]] =
Seq(
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
setNextVersion,
commitNextVersion,
pushChanges
)
)
}
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
addSbtPlugin("com.disneystreaming.smithy4s" % "smithy4s-sbt-codegen" % "0.18.23")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.10.4")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
addSbtPlugin("nl.gn0s1s" % "sbt-dotenv" % "3.0.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2")
1 change: 1 addition & 0 deletions version.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ThisBuild / version := "3.0.1-SNAPSHOT"

0 comments on commit 7387a19

Please sign in to comment.