-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
This has several fixes / changes: - changes to remote dependencies will be detected - cache keys will remain stable accross rebuilds - cache keys will not be generated on dirty repos (same behavior as old deploy plugin)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment about executable flags. This change fixes a bunch of stuff. Thanks!
case (source, destination) => | ||
if (source.canExecute) { | ||
destination.setExecutable(true) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd replace this if
block with destination.setExecutable(source.canExecute)
. That way if we'll sync up the flag if the destination was marked executable, but the source's flag has changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the copy
line beforehand will replace the target, so this might work regardless - but this is cleaner. Updated!
// Find the git commits for the current project and local dependencies, since this is more | ||
// stable than a hash of the contents. | ||
val unstableContentsCommits: Seq[Option[String]] = { | ||
(Def.taskDyn(gitCommitIfClean.all(HelperDefs.dependencyFilter.value)).value :+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like that you're doing this by project, so an unrelated change won't dirty it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some edge-cases where this breaks, unfortunately. Notably, this doesn't take into account changes in root sbt settings (settings in the root build.sbt
or root project/*
). However, these would have to be changes which affected the compiled code but not either dependencies or the Dockerfile - so, things like updates to the docker plugin...
:P
This fixes #266, #268, and a few cache key bugs.