From a59f96f63bde6e500f7d1731309683b89c91e6a5 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Wed, 13 Oct 2021 16:02:32 +0800 Subject: [PATCH 1/3] Upgrade to .NET 6.0 RC.2 --- .github/workflows/build-and-test.yml | 2 +- global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 52cd297908..0effab7547 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-dotnet@master with: - dotnet-version: 6.0.100-rc.1.21458.32 + dotnet-version: 6.0.100-rc.2.21505.57 - name: Build All run: .\build-all.ps1 diff --git a/global.json b/global.json index 5eb4fe87e4..c2d131a051 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.100-rc.1.21458.32", + "version": "6.0.100-rc.2.21505.57", "rollForward": "latestFeature" } } From 6ef5ce7f2d7def376e037fe3bb1c4d2ab78a995b Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 13 Oct 2021 20:07:44 +0800 Subject: [PATCH 2/3] Check newline for min files. --- .../Volo/Abp/Cli/Bundling/BundlerBase.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs index e6bff3233c..9db9ced89e 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs @@ -41,7 +41,7 @@ namespace Volo.Abp.Cli.Bundling return GenerateDefinition(bundleFilePath,fileDefinitionsExcludingFromBundle); } - private bool IsMinFile(string fileName) + private bool IsMinFile(string fileName, string content) { foreach (var suffix in _minFileSuffixes) { @@ -51,6 +51,11 @@ namespace Volo.Abp.Cli.Bundling } } + if (content.IndexOf(Environment.NewLine, StringComparison.Ordinal) < 10) + { + return true; + } + return false; } @@ -117,7 +122,7 @@ namespace Volo.Abp.Cli.Bundling private string GetFileContent(string filePath, bool minify) { var content = File.ReadAllText(filePath); - if (minify && !IsMinFile(filePath)) + if (minify && !IsMinFile(filePath, content)) { try { From b455be16d3ca7f15c28375d7e669799b0c37677d Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 13 Oct 2021 20:39:11 +0800 Subject: [PATCH 3/3] Use `SplitToLines`. --- .../src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs index 9db9ced89e..ce52b36d79 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs @@ -51,7 +51,7 @@ namespace Volo.Abp.Cli.Bundling } } - if (content.IndexOf(Environment.NewLine, StringComparison.Ordinal) < 10) + if (content.SplitToLines().Length < 10) { return true; }