Skip to content

Commit

Permalink
Simple generateFromDb overload dropped test scope. (breaking, fixes #…
Browse files Browse the repository at this point in the history
…118) (#120)

Must now do `generated.foreach(_.overwriteFolder())
`
  • Loading branch information
oyvindberg authored Jul 13, 2024
1 parent a1833fd commit e6cb0de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion site-in/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ generateFromDb(
testTargetFolder = Some(testTargetDir),
selector = selector,
scriptsPaths = List(scriptsFolder)
).overwriteFolder()
).foreach(_.overwriteFolder())

// add changed files to git, so you can keep them under control
//scala.sys.process.Process(List("git", "add", targetDir.toString)).!!
Expand Down
2 changes: 1 addition & 1 deletion typo-scripts/src/scala/scripts/GeneratedSources.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ object GeneratedSources {
List(buildDir.resolve("sql"))
)

files.overwriteFolder(): @nowarn
files.foreach(_.overwriteFolder())

import scala.sys.process.*
List("git", "add", "-f", typoSources.toString).!! : @nowarn
Expand Down
4 changes: 2 additions & 2 deletions typo/src/scala/typo/generateFromDb.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ object generateFromDb {
testTargetFolder: Option[Path],
selector: Selector = Selector.ExcludePostgresInternal,
scriptsPaths: List[Path] = Nil
): Generated =
apply(dataSource, options, ProjectGraph(name = "", targetFolder, testTargetFolder, selector, scriptsPaths, Nil)).head
): List[Generated] =
apply(dataSource, options, ProjectGraph(name = "", targetFolder, testTargetFolder, selector, scriptsPaths, Nil))

/** Allows you to generate code into multiple folders
*/
Expand Down

0 comments on commit e6cb0de

Please sign in to comment.