From ed226172dd0befd6dce5f8bacc4da9dbe52809ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20C=C3=A1ceres?= Date: Wed, 23 Mar 2022 14:21:10 +0100 Subject: [PATCH 1/2] Add .json as default extension for dotnet-combine zip This aims to support appsettings.json files by default --- README.md | 4 ++-- src/DotnetCombine/Options/ZipOptions.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 41996b7..b94939a 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ This tool can be used for more general purposes than the previous one. Some of t - Extracting all `.css` files from a web development project. -- Extracting all the relevant source code files (`.sln`, `.csproj`, `.cs`, `.razor`, `.xaml`, etc.) from your .NET project in a GitHub Action step, to be able to make them available as an artifact. +- Extracting all the relevant source code files (`.sln`, `.csproj`, `.cs`, `.json`, `.razor`, `.xaml`, etc.) from your .NET project in a GitHub Action step, to be able to make them available as an artifact. - ... @@ -158,7 +158,7 @@ Usage: dotnet-combine zip [options] directory. If no filename is provided (i.e. --output dir/), a unique name will be used. - --extensions (Default: .sln .csproj .cs) + --extensions (Default: .sln .csproj .cs .json) File extensions to include, separated by semicolons (;). -f, --overwrite (Default: false) diff --git a/src/DotnetCombine/Options/ZipOptions.cs b/src/DotnetCombine/Options/ZipOptions.cs index e8b517c..d2f6e19 100644 --- a/src/DotnetCombine/Options/ZipOptions.cs +++ b/src/DotnetCombine/Options/ZipOptions.cs @@ -15,9 +15,9 @@ If no dir path is provided (i.e. --output file.cs), the file will be created in If no filename is provided (i.e. --output dir/), a unique name will be used.")] public string? Output { get; set; } - [Option(longName: "extensions", Required = false, Separator = ';', Default = new[] { ".sln", ".csproj", ".cs" }, HelpText = @" + [Option(longName: "extensions", Required = false, Separator = ';', Default = new[] { ".sln", ".csproj", ".cs", ".json" }, HelpText = @" File extensions to include, separated by semicolons (;).")] - public IEnumerable Extensions { get; set; } = new[] { ".cs", ".csproj", ".sln" }; + public IEnumerable Extensions { get; set; } = new[] { ".sln", ".csproj", ".cs", ".json" }; [Option(shortName: 'f', longName: "overwrite", Required = false, Default = false, HelpText = @" Overwrites the output file (if it exists).")] From ba2d72f9142b10c50958b1804e3aee5f06a0afe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20C=C3=A1ceres?= Date: Wed, 23 Mar 2022 14:25:11 +0100 Subject: [PATCH 2/2] Fix .NET version in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b94939a..398f6fc 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ ## Installing `dotnet-combine` -.NET 5 SDK is required to use this tool. You can download it from [here](https://dotnet.microsoft.com/download/dotnet/5.0). +.NET 6 SDK is required to use this tool. You can download it from [here](https://dotnet.microsoft.com/download/dotnet/6.0). The tool can be installed globally by running: