Skip to content

Commit

Permalink
VCI-904: GlobalModuleIgnoreFileUrl can be a local file
Browse files Browse the repository at this point in the history
  • Loading branch information
krankenbro committed Jul 31, 2024
1 parent 10239bf commit 2848bf0
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/VirtoCommerce.Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1252,9 +1252,21 @@ private void CompressExecuteMethod()
const string moduleIgnoreUrlTemplate = "https://raw.githubusercontent.com/VirtoCommerce/vc-platform/{0}/module.ignore";
if(string.IsNullOrEmpty(GlobalModuleIgnoreFileUrl))
{
GlobalModuleIgnoreFileUrl = string.Format(moduleIgnoreUrlTemplate, ModuleManifest?.PlatformVersion ?? "dev");
Version.TryParse(ModuleManifest.PlatformVersion, out var platformVersion);

GlobalModuleIgnoreFileUrl = string.Format(moduleIgnoreUrlTemplate, platformVersion?.ToString() ?? "dev");
}
var ignoredFiles = HttpTasks.HttpDownloadString(GlobalModuleIgnoreFileUrl).SplitLineBreaks();

string[] ignoredFiles;
if (GlobalModuleIgnoreFileUrl.StartsWith("http"))
{
ignoredFiles = HttpTasks.HttpDownloadString(GlobalModuleIgnoreFileUrl).SplitLineBreaks();
}
else
{
ignoredFiles = File.ReadAllLines(GlobalModuleIgnoreFileUrl);
}


if (ModuleIgnoreFile.FileExists())
{
Expand Down

0 comments on commit 2848bf0

Please sign in to comment.