Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update org name to VirtusLab for downloading scalafmt-native-image #1253

Merged
merged 2 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.5.8"
version = "3.5.9"

align.preset = more
maxColumn = 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,22 @@ import scala.cli.commands.FmtOptions
import scala.cli.commands.util.SharedOptionsUtil._
import scala.util.Properties

import coursier.core.Version

object FmtOptionsUtil {
implicit class FmtOptionsOps(v: FmtOptions) {
import v._
def binaryUrl(version: String): (String, Boolean) = {
val osArchSuffix0 = osArchSuffix.map(_.trim).filter(_.nonEmpty)
.getOrElse(FetchExternalBinary.platformSuffix())
val tag0 = scalafmtTag.getOrElse("v" + version)
val gitHubOrgName0 = scalafmtGithubOrgName.getOrElse("alexarchambault/scalafmt-native-image")
val extension0 = if (Properties.isWin) ".zip" else ".gz"
val tag0 = scalafmtTag.getOrElse("v" + version)
val gitHubOrgName0 = scalafmtGithubOrgName.getOrElse {
if (Version(version) < Version("3.5.9"))
"scala-cli/scalafmt-native-image"
else // from version 3.5.9 scalafmt-native-image repository was moved to VirtusLab organisation
"virtuslab/scalafmt-native-image"
}
val extension0 = if (Properties.isWin) ".zip" else ".gz"
val url =
s"https://github.com/$gitHubOrgName0/releases/download/$tag0/scalafmt-$osArchSuffix0$extension0"
(url, !tag0.startsWith("v"))
Expand Down
2 changes: 1 addition & 1 deletion project/deps.sc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ object Deps {
def scala3Compiler(sv: String) = ivy"org.scala-lang:scala3-compiler_3:$sv"
def scalaAsync = ivy"org.scala-lang.modules::scala-async:1.0.1".exclude("*" -> "*")
def scalac(sv: String) = ivy"org.scala-lang:scala-compiler:$sv"
def scalafmtCli = ivy"org.scalameta:scalafmt-cli_2.13:3.5.8"
def scalafmtCli = ivy"org.scalameta:scalafmt-cli_2.13:3.5.9"
// Force using of 2.13 - is there a better way?
def scalaJsEnvJsdomNodejs =
ivy"org.scala-js:scalajs-env-jsdom-nodejs_2.13:1.1.0"
Expand Down