Skip to content

Commit

Permalink
VCI-884: Fix checking of platform src existing (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
krankenbro authored May 28, 2024
1 parent c79bbc5 commit 12a4506
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/VirtoCommerce.Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public static Solution Solution
protected static GitRepository GitRepository => GitRepository.FromLocalDirectory(RootDirectory / ".git");

protected static AbsolutePath SourceDirectory => RootDirectory / "src";
protected static bool IsPlatformSource => SourceDirectory.Exists();
protected static bool IsPlatformSource => Directory.Exists(Path.Combine(SourceDirectory, "VirtoCommerce.Platform.Web"));
protected static AbsolutePath TestsDirectory => RootDirectory / "tests";
protected static AbsolutePath SamplesDirectory => RootDirectory / "samples";

Expand Down Expand Up @@ -272,7 +272,7 @@ protected static TelemetryClient TelemetryClient
private static string GetSafeCmdArguments()
{
var safeArgs = EnvironmentInfo.CommandLineArguments.Join(" ");
foreach(var arg in EnvironmentInfo.CommandLineArguments.Where(a => TokenArguments.Contains(a.Replace("-", ""), StringComparer.InvariantCultureIgnoreCase)))
foreach (var arg in EnvironmentInfo.CommandLineArguments.Where(a => TokenArguments.Contains(a.Replace("-", ""), StringComparer.InvariantCultureIgnoreCase)))
{
var argValue = EnvironmentInfo.GetNamedArgument<string>(arg);
safeArgs = safeArgs.Replace(argValue, "***");
Expand Down Expand Up @@ -302,10 +302,14 @@ protected override void OnTargetFailed(string target)
.Before(Restore)
.Executes(() =>
{
List<AbsolutePath> ignorePaths = [WebProject.Directory / "modules"];
if (ThereAreCustomApps)
var ignorePaths = new List<AbsolutePath>();
if (WebProject != null)
{
ignorePaths.Add(WebProject.Directory / "App");
ignorePaths.Add(WebProject.Directory / "modules");
if (ThereAreCustomApps)
{
ignorePaths.Add(WebProject.Directory / "App");
}
}

CleanSolution(cleanSearchPattern, ignorePaths.ToArray());
Expand Down

0 comments on commit 12a4506

Please sign in to comment.