Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
!Fix errors in generating filegroups
Browse files Browse the repository at this point in the history
(cherry picked from commit eedc352)
  • Loading branch information
TimvandeVen committed Dec 19, 2023
1 parent 06de9a7 commit ee394f5
Showing 1 changed file with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,30 +90,25 @@ public CsProjectFileDefinition(string projectFilePath, string slnBasePath)
.Replace("/**/", ":")}";
imports.Add(path);

if(string.IsNullOrEmpty(filegroupName))
if(!string.IsNullOrEmpty(filegroupName))
{
filegroupName = path;
}

exports.Add($@"filegroup(
exports.Add($@"filegroup(
name = {Quote(filegroupName)},
srcs = {Quote(path)},
visibility = [{Quote("visibility")}],
srcs = [{Quote(include)}],
visibility = [{Quote(visibility)}],
)");
}
}
else
{
if(string.IsNullOrEmpty(filegroupName))
if(!string.IsNullOrEmpty(filegroupName))
{
filegroupName = include;
}

exports.Add($@"filegroup(
exports.Add($@"filegroup(
name = {Quote(filegroupName)},
srcs = {Quote(include)},
srcs = [{Quote(include)}],
visibility = [{Quote(visibility)}],
)");

}
includes.Add(include);
}
}
Expand Down

0 comments on commit ee394f5

Please sign in to comment.