Skip to content

Commit

Permalink
VCI-904: Get module.ignore from file regarding to platform version (#141
Browse files Browse the repository at this point in the history
)
  • Loading branch information
krankenbro authored Jul 30, 2024
1 parent f0a09b9 commit 10239bf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/VirtoCommerce.Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Microsoft.Build.Locator;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NuGet.Packaging;
using Nuke.Common;
using Nuke.Common.Execution;
using Nuke.Common.Git;
Expand Down Expand Up @@ -90,8 +91,7 @@ public static Solution Solution
[Parameter] public static string Source { get; set; } = "https://api.nuget.org/v3/index.json";

[Parameter]
public static string GlobalModuleIgnoreFileUrl { get; set; } =
"https://raw.githubusercontent.com/VirtoCommerce/vc-platform/dev/module.ignore";
public static string GlobalModuleIgnoreFileUrl { get; set; }

[Parameter] public static string SonarAuthToken { get; set; } = "";

Expand Down Expand Up @@ -1249,6 +1249,11 @@ private void CompressExecuteMethod()
{
if (IsModule)
{
const string moduleIgnoreUrlTemplate = "https://raw.githubusercontent.com/VirtoCommerce/vc-platform/{0}/module.ignore";
if(string.IsNullOrEmpty(GlobalModuleIgnoreFileUrl))
{
GlobalModuleIgnoreFileUrl = string.Format(moduleIgnoreUrlTemplate, ModuleManifest?.PlatformVersion ?? "dev");
}
var ignoredFiles = HttpTasks.HttpDownloadString(GlobalModuleIgnoreFileUrl).SplitLineBreaks();

if (ModuleIgnoreFile.FileExists())
Expand Down

0 comments on commit 10239bf

Please sign in to comment.