Skip to content

Commit

Permalink
Merge pull request #722 from kubukoz/support-url-repo
Browse files Browse the repository at this point in the history
Fallback on non-MavenRepository repos
  • Loading branch information
armanbilge authored Jul 26, 2024
2 parents a0a32fc + b33d464 commit ce3d86e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ object TypelevelCiPlugin extends AutoPlugin {
override def projectSettings: Seq[Setting[_]] = Seq(
Test / Keys.executeTests := {
val results: Tests.Output = (Test / Keys.executeTests).value
GitHubActionsPlugin.appendtoStepSummary(
GitHubActionsPlugin.appendToStepSummary(
renderTestResults(Keys.thisProject.value.id, Keys.scalaVersion.value, results)
)
results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ object GitHubActionsPlugin extends AutoPlugin {
}
}

private[typelevel] def appendtoStepSummary(summaryText: String) =
private[typelevel] def appendToStepSummary(summaryText: String) =
Option(System.getenv("GITHUB_STEP_SUMMARY")).map { summaryFile =>
IO.write(new File(summaryFile), summaryText, append = true)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,17 @@ object TypelevelSonatypeCiReleasePlugin extends AutoPlugin {
|resolvers += "${repo.name}" at "${repo.root}"
|```
|""".stripMargin

case repo: URLRepository =>
s"""|```scala
|resolvers += URLRepository("${repo.name}", ${repo.patterns}, ${repo.allowInsecureProtocol})
|```
|""".stripMargin
// fallback to print at least _something_
case other => other.toString
}

GitHubActionsPlugin.appendtoStepSummary(
GitHubActionsPlugin.appendToStepSummary(
s"""|## Published `$v`
|${resolver}""".stripMargin
)
Expand Down

0 comments on commit ce3d86e

Please sign in to comment.