Skip to content

Commit

Permalink
Fix getting changed workspaces if no vars files are changed
Browse files Browse the repository at this point in the history
  • Loading branch information
drakon64 committed Dec 3, 2024
1 parent 909a4d8 commit c424251
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions Amaurot.Processor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,21 @@ await Console.Out.WriteLineAsync(
);

var workspaces = (
from changedDirectory in changedDirectories
from changedTfVar in changedTfVars
from workspace in amaurotJson.Workspaces
where
workspace.Directory == changedDirectory
|| (
workspace.VarFiles is not null
&& workspace.VarFiles.Contains(changedTfVar)
)
select workspace
changedTfVars.Length != 0
? from changedDirectory in changedDirectories
from changedTfVar in changedTfVars
from workspace in amaurotJson.Workspaces
where
workspace.Directory == changedDirectory
|| (
workspace.VarFiles is not null
&& workspace.VarFiles.Contains(changedTfVar)
)
select workspace
: from changedDirectory in changedDirectories
from workspace in amaurotJson.Workspaces
where workspace.Directory == changedDirectory
select workspace
)
.Distinct()
.ToArray();
Expand Down

0 comments on commit c424251

Please sign in to comment.