@@ -10,10 +10,11 @@ import (
1010
1111 "projectforge.dev/projectforge/app/file"
1212 "projectforge.dev/projectforge/app/lib/filesystem"
13+ "projectforge.dev/projectforge/app/project"
1314 "projectforge.dev/projectforge/app/util"
1415)
1516
16- func FileLoader (mods []string , src file.Files , tgt filesystem.FileLoader , ignoredFiles []string , includeUnchanged bool , logger util.Logger ) (Diffs , error ) {
17+ func FileLoader (mods []string , src file.Files , tgt filesystem.FileLoader , ignoredFiles []string , bld * project. Build , includeUnchanged bool , logger util.Logger ) (Diffs , error ) {
1718 var ret Diffs
1819 for _ , s := range src {
1920 p := s .FullPath ()
@@ -36,7 +37,7 @@ func FileLoader(mods []string, src file.Files, tgt filesystem.FileLoader, ignore
3637 }
3738 }
3839
39- matches , err := matchesModules (s , mods , tgtFile )
40+ matches , err := matchesModules (s , mods , bld , tgtFile )
4041 if err != nil {
4142 return nil , err
4243 }
@@ -57,7 +58,7 @@ func FileLoader(mods []string, src file.Files, tgt filesystem.FileLoader, ignore
5758 return ret , nil
5859}
5960
60- func matchesModules (s * file.File , mods []string , tgtFile * file.File ) (bool , error ) {
61+ func matchesModules (s * file.File , mods []string , bld * project. Build , tgtFile * file.File ) (bool , error ) {
6162 if idx := strings .Index (s .Content , file .ModulePrefix ); idx > 1 {
6263 lines := util .StringSplitLines (s .Content )
6364 line , lineIdx , _ := lo .FindIndexOf (lines , func (line string ) bool {
@@ -76,8 +77,15 @@ func matchesModules(s *file.File, mods []string, tgtFile *file.File) (bool, erro
7677
7778 hasAllMods := true
7879 lo .ForEach (tgtMods , func (mod string , _ int ) {
79- if ! lo .Contains (mods , mod ) {
80- hasAllMods = false
80+ switch {
81+ case mod == "docker" :
82+ if bld .SkipDocker {
83+ hasAllMods = false
84+ }
85+ default :
86+ if ! lo .Contains (mods , mod ) {
87+ hasAllMods = false
88+ }
8189 }
8290 })
8391 if hasAllMods {
0 commit comments