Skip to content

Commit

Permalink
add a space to the Scala version selector command
Browse files Browse the repository at this point in the history
Using `sbt '++2.13' test` works, but `sbt '++3' test` does not. However,
both `sbt '++ 2.13' test` and `sbt '++ 3' test` work, and the space is
included in the sbt documentation:
https://www.scala-sbt.org/1.x/docs/Cross-Build.html#Switching+Scala+version
  • Loading branch information
bpholt committed Nov 7, 2022
1 parent dfcd363 commit f7c8737
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,22 @@ jobs:

- name: Check headers and formatting
if: matrix.java == 'temurin@8'
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck

- name: Test
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' test
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test

- name: Check scalafix lints
if: matrix.java == 'temurin@8'
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' 'scalafixAll --check'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'scalafixAll --check'

- name: Check binary compatibility
if: matrix.java == 'temurin@8'
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' mimaReportBinaryIssues
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues

- name: Generate API documentation
if: matrix.java == 'temurin@8'
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' doc
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc

- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/0.4')
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
(echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1)
- name: Publish
run: sbt '++${{ matrix.scala }}' tlRelease
run: sbt '++ ${{ matrix.scala }}' tlRelease

site:
name: Generate Site
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Generate site
run: sbt '++${{ matrix.scala }}' docs/tlSite
run: sbt '++ ${{ matrix.scala }}' docs/tlSite

- name: Publish site
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/series/0.4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ trait GenerativeKeys {
"A list of steps to insert after comping and testing but before the end of the build job (default: [])")
lazy val githubWorkflowBuildSbtStepPreamble =
settingKey[Seq[String]](
s"Commands automatically prepended to a WorkflowStep.Sbt (default: ['++$${{ matrix.scala }}'])")
s"Commands automatically prepended to a WorkflowStep.Sbt (default: ['++ $${{ matrix.scala }}'])")
lazy val githubWorkflowBuild = settingKey[Seq[WorkflowStep]](
"A sequence of workflow steps which compile and test the project (default: [Sbt(List(\"test\"))])")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
githubWorkflowBuildRunsOnExtraLabels := Seq(),
githubWorkflowBuildPreamble := Seq(),
githubWorkflowBuildPostamble := Seq(),
githubWorkflowBuildSbtStepPreamble := Seq(s"++$${{ matrix.scala }}"),
githubWorkflowBuildSbtStepPreamble := Seq(s"++ $${{ matrix.scala }}"),
githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test"), name = Some("Build project"))),
githubWorkflowPublishPreamble := Seq(),
githubWorkflowPublishPostamble := Seq(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final case class WorkflowJob(
id: String,
name: String,
steps: List[WorkflowStep],
sbtStepPreamble: List[String] = List(s"++$${{ matrix.scala }}"),
sbtStepPreamble: List[String] = List(s"++ $${{ matrix.scala }}"),
cond: Option[String] = None,
env: Map[String, String] = Map(),
oses: List[String] = List("ubuntu-latest"),
Expand Down

0 comments on commit f7c8737

Please sign in to comment.