Skip to content

Commit 0238804

Browse files
authored
Merge pull request #35 from AnyMindGroup/update/code-generator-0.0.8
update code generator, remove redundant code formatting step
2 parents 5f7eca2 + 1a67632 commit 0238804

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

build.sbt

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ lazy val sttpClient4Version = "4.0.9"
4747

4848
lazy val jsoniterVersion = "2.37.0"
4949

50-
lazy val codegenVersion = "0.0.7"
50+
lazy val codegenVersion = "0.0.8"
5151

5252
inThisBuild(
5353
List(
@@ -263,29 +263,6 @@ def codegenTask(
263263

264264
val files = listFilesRec(List(outPkgDir), Nil)
265265
logger.success(s"Generated ${files.length} files in ${outPkgDir.getPath()}")
266-
267-
// skip formatting in CI
268-
if (sys.env.get("CI").isEmpty) {
269-
// formatting (may need to find another way...)
270-
val fmtCmd =
271-
s"scala-cli fmt --scalafmt-conf=./.scalafmt.conf ${outDir.absolutePath}"
272-
logger.info(s"Formatting with '$fmtCmd'")
273-
val fmtErrs = scala.collection.mutable.ListBuffer.empty[String]
274-
fmtCmd ! ProcessLogger(
275-
_ => (),
276-
e => fmtErrs += e,
277-
) match {
278-
case 0 => ()
279-
case c =>
280-
throw new InterruptedException(s"Failure on code formatting with exit code $c: ${fmtErrs.mkString("\n")}")
281-
}
282-
283-
IO.delete(outDir / ".scala-build")
284-
logger.success(s"Formatting sources in ${outDir.getPath()} done")
285-
} else {
286-
logger.info("Skipping generated code formatting")
287-
}
288-
289266
files
290267
}
291268
}

0 commit comments

Comments
 (0)