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

FIX #1205 undefined setting makeBashScripts with vanilla DockerPlugin #1207

Merged
merged 4 commits into from
Mar 2, 2019
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,15 @@ object DockerPlugin extends AutoPlugin {
dockerRmiCommand := dockerExecCommand.value ++ Seq("rmi"),
dockerBuildCommand := dockerExecCommand.value ++ Seq("build") ++ dockerBuildOptions.value ++ Seq("."),
dockerAdditionalPermissions := {
val scripts = makeBashScripts.value
val ms = (mappings in Docker).value
scripts flatMap {
case (script, _) =>
ms collect {
case (k, v) if k == script => DockerChmodType.UserGroupPlusExecute -> v
}
}
val basePath = (defaultLinuxInstallLocation in Docker).value
(mappings in Docker).value
.collect {
// by default we assume everything in the bin/ folder should be executable that is not a .bat file
case (_, path) if path.startsWith(s"$basePath/bin/") && !path.endsWith(".bat") =>
DockerChmodType.UserGroupPlusExecute -> path
// sh files should also be marked as executable
case (_, path) if path.endsWith(".sh") => DockerChmodType.UserGroupPlusExecute -> path
}
},
dockerCommands := {
val strategy = dockerPermissionStrategy.value
Expand Down