Skip to content

Commit

Permalink
Fix scripted tests (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtimush authored Oct 25, 2024
1 parent f4331de commit 4d39be6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import java.util

object ProtofetchBinary {

val DEFAULT_VERSION = "0.1.1"
val DEFAULT_VERSION = "0.1.8"

def download(
logger: Logger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ object ProtofetchPlugin extends AutoPlugin {
)

override lazy val projectSettings: Seq[Setting[_]] = Seq(
protofetchModuleFile := baseDirectory.value / "protofetch.toml",
protofetchModuleFile := baseDirectory.value / "protofetch.toml",
protofetchFetch / baseDirectory := protofetchModuleFile.value.getParentFile,
protofetchLockFile := protofetchModuleFile.value.getParentFile / "protofetch.lock",
protofetchOutputDirectory := {
val moduleFile = protofetchModuleFile.value
moduleFile.getParentFile / Protofetch.getOutputDirectory(moduleFile)
(protofetchFetch / baseDirectory).value /
Protofetch.getOutputDirectory(protofetchModuleFile.value)
},
protofetchFetch / insideCI := insideCI.value,
protofetchFetch := {
Expand All @@ -69,14 +70,15 @@ object ProtofetchPlugin extends AutoPlugin {
val s = streams.value
val binaryFileInfo = FileInfo.lastModified(protofetchBinary.value)
val moduleFileInfo = FileInfo.hash(protofetchModuleFile.value)
val base = (protofetchFetch / baseDirectory).value;
val lockFile = protofetchLockFile.value
val locked = (protofetchFetch / insideCI).value

val tracked = Tracked.outputChangedW(s.cacheStoreFactory.make("fetch"))({
(changed, _: (Inputs, Outputs)) =>
if (changed) {
Protofetch.fetch(
baseDirectory.value,
base,
s.log,
binaryFileInfo.file,
moduleFileInfo.file,
Expand Down

0 comments on commit 4d39be6

Please sign in to comment.