From af7e45bf8b7ed6d85db5f309a518a23984d1be31 Mon Sep 17 00:00:00 2001 From: CartBlanche Date: Tue, 19 Nov 2024 11:46:57 +0000 Subject: [PATCH] Simplify use File name from licensepath for consistency. --- Tasks/PublishPackageTask.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Tasks/PublishPackageTask.cs b/Tasks/PublishPackageTask.cs index 2700f33..337fe71 100644 --- a/Tasks/PublishPackageTask.cs +++ b/Tasks/PublishPackageTask.cs @@ -86,12 +86,9 @@ public override async Task RunAsync(BuildContext context) var readMePath = $"{readMeName}"; var licensePath = context.PackContext.LicensePath; - var licenseName = "LICENSE"; + var licenseName = System.IO.Path.GetFileName(licensePath); - if (licensePath.EndsWith(".txt")) licenseName += ".txt"; - else if (licensePath.EndsWith(".md")) licenseName += ".md"; - - var librariesToInclude = from rid in downloadedRids from filePath in Directory.GetFiles($"runtimes/{rid}/native") + var librariesToInclude = from rid in downloadedRids from filePath in Directory.GetFiles($"runtimes/{rid}/native") select $"runtimes/{rid}/native"; // Generate Project