Skip to content

Commit

Permalink
Merge branch 'main' into wip/bsp
Browse files Browse the repository at this point in the history
  • Loading branch information
fthomas committed Jan 9, 2024
2 parents e5e5dad + 600d2a3 commit 4675929
Show file tree
Hide file tree
Showing 38 changed files with 464 additions and 387 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)
[![Docker Pulls](https://img.shields.io/docker/pulls/fthomas/scala-steward.svg?style=flat&color=blue)](https://hub.docker.com/r/fthomas/scala-steward/)

Scala Steward is a bot that helps you keep your library dependencies, sbt plugins, and Scala and sbt versions up-to-date.
Scala Steward is a bot that helps you keep your library dependencies and build plugins up-to-date.
It works with [Maven](https://maven.apache.org/), [Mill](https://mill-build.com/), [sbt](https://www.scala-sbt.org/), and [Scala CLI](https://scala-cli.virtuslab.org/).

See also the announcement blog post:
[*Keep your projects up-to-date with Scala Steward*](https://www.scala-lang.org/blog/2019/07/10/announcing-scala-steward.html)
Expand Down
22 changes: 18 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -428,17 +428,22 @@ lazy val moduleRootPkg = settingKey[String]("").withRank(KeyRanks.Invisible)
moduleRootPkg := rootPkg

// Run Scala Steward from sbt for development and testing.
// Do not do this in production.
// Members of the @scala-steward-org/core team can request an access token
// of @scala-steward-dev for local development from @fthomas.
lazy val runSteward = taskKey[Unit]("")
runSteward := Def.taskDyn {
val home = System.getenv("HOME")
val projectDir = (LocalRootProject / baseDirectory).value
val gitHubLogin = projectName + "-dev"
// val gitHubAppDir = projectDir.getParentFile / "gh-app"
val args = Seq(
Seq("--workspace", s"$projectDir/workspace"),
Seq("--repos-file", s"$projectDir/repos.md"),
Seq("--git-author-email", s"me@$projectName.org"),
Seq("--forge-login", projectName),
Seq("--git-ask-pass", s"$home/.github/askpass/$projectName.sh"),
Seq("--git-author-email", s"dev@$projectName.org"),
Seq("--forge-login", gitHubLogin),
Seq("--git-ask-pass", s"$home/.github/askpass/$gitHubLogin.sh"),
// Seq("--github-app-id", IO.read(gitHubAppDir / "scala-steward.app-id.txt").trim),
// Seq("--github-app-key-file", s"$gitHubAppDir/scala-steward.private-key.pem"),
Seq("--whitelist", s"$home/.cache/coursier"),
Seq("--whitelist", s"$home/.cache/JNA"),
Seq("--whitelist", s"$home/.cache/mill"),
Expand All @@ -450,6 +455,15 @@ runSteward := Def.taskDyn {
(core.jvm / Compile / run).toTask(args)
}.value

lazy val runValidateRepoConfig = taskKey[Unit]("")
runValidateRepoConfig := Def.taskDyn {
val projectDir = (LocalRootProject / baseDirectory).value
val args = Seq(
Seq("validate-repo-config", s"$projectDir/.scala-steward.conf")
).flatten.mkString(" ", " ", "")
(core.jvm / Compile / run).toTask(args)
}.value

/// commands

def addCommandsAlias(name: String, cmds: Seq[String]) =
Expand Down
6 changes: 6 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ Updates for `sbt` and `scalafmt` can be controlled by using the following `group
{ groupId = "org.scalameta", artifactId = "scalafmt-core" }
```

Updates for the Scala 2 or Scala 3 version can be controlled by using the respective `groupId` and `artifactId`:
```properties
{ groupId = "org.scala-lang", artifactId = "scala-library" }
{ groupId = "org.scala-lang", artifactId = "scala3-library" }
```

## Can Scala Steward update multiple branches in a repository?

Yes! You can update multiple branches of a repository by adding it several times to the "repos.md" file
Expand Down
2 changes: 1 addition & 1 deletion docs/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ All command line arguments for the `scala-steward` application.

```
Usage:
scala-steward validate-repo-config
scala-steward --workspace <file> --repos-file <uri> [--repos-file <uri>]... [--git-author-name <string>] --git-author-email <string> [--git-author-signing-key <string>] --git-ask-pass <file> [--sign-commits] [--forge-type <forge-type>] [--forge-api-host <uri>] --forge-login <string> [--do-not-fork] [--add-labels] [--ignore-opts-files] [--env-var <name=value>]... [--process-timeout <duration>] [--whitelist <string>]... [--read-only <string>]... [--enable-sandbox | --disable-sandbox] [--max-buffer-size <integer>] [--repo-config <uri>]... [--disable-default-repo-config] [--scalafix-migrations <uri>]... [--disable-default-scalafix-migrations] [--artifact-migrations <uri>]... [--disable-default-artifact-migrations] [--cache-ttl <duration>] [--bitbucket-use-default-reviewers] [--bitbucket-server-use-default-reviewers] [--gitlab-merge-when-pipeline-succeeds] [--gitlab-required-reviewers <integer>] [--gitlab-remove-source-branch] [--azure-repos-organization <string>] [--github-app-id <integer> --github-app-key-file <file>] [--url-checker-test-url <uri>]... [--default-maven-repo <string>] [--refresh-backoff-period <duration>]
scala-steward validate-repo-config
Expand Down
45 changes: 45 additions & 0 deletions modules/core/src/main/resources/artifact-migrations.v2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,31 @@ changes = [
groupIdAfter = com.typesafe.play
artifactIdAfter = play-grpc-testkit
},
{
groupIdBefore = com.typesafe.play
groupIdAfter = org.playframework
artifactIdAfter = play-grpc-generators
},
{
groupIdBefore = com.typesafe.play
groupIdAfter = org.playframework
artifactIdAfter = play-grpc-runtime
},
{
groupIdBefore = com.typesafe.play
groupIdAfter = org.playframework
artifactIdAfter = play-grpc-scalatest
},
{
groupIdBefore = com.typesafe.play
groupIdAfter = org.playframework
artifactIdAfter = play-grpc-specs2
},
{
groupIdBefore = com.typesafe.play
groupIdAfter = org.playframework
artifactIdAfter = play-grpc-testkit
},
{
groupIdBefore = com.lightbend.sbt
groupIdAfter = com.github.sbt
Expand Down Expand Up @@ -1074,4 +1099,24 @@ changes = [
groupIdAfter = org.playframework.silhouette
artifactIdAfter = play-silhouette
},
{
groupIdAfter = org.typelevel
artifactIdBefore = otel4s-java
artifactIdAfter = otel4s-oteljava
},
{
groupIdAfter = org.typelevel
artifactIdBefore = otel4s-java-common
artifactIdAfter = otel4s-oteljava-common
},
{
groupIdAfter = org.typelevel
artifactIdBefore = otel4s-java-metrics
artifactIdAfter = otel4s-oteljava-metrics
},
{
groupIdAfter = org.typelevel
artifactIdBefore = otel4s-java-trace
artifactIdAfter = otel4s-oteljava-trace
},
]
Loading

0 comments on commit 4675929

Please sign in to comment.