Skip to content

Commit

Permalink
Feature/prepare the first release (#2)
Browse files Browse the repository at this point in the history
* Prepare the first release +semver: major

* Fix the GitVersion file

* Set the initial version

* Upgraded the projects and dependencies

* Removed some unused codes and reset the version +semver:fix

* Reset the version
  • Loading branch information
moattarwork authored Jan 2, 2023
1 parent 5ef0fa3 commit 17833b8
Show file tree
Hide file tree
Showing 61 changed files with 188 additions and 145 deletions.
5 changes: 4 additions & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
next-version: 1.0
next-version: 1.0.1
mode: Mainline
major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
no-bump-message: '\+semver:\s?(none|skip)'
ignore:
commits-before: 2023-01-01T00:00:00

2 changes: 0 additions & 2 deletions src/GlobalUsings.System.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
global using System.IO;
global using System.Linq;
global using System.Linq.Expressions;
global using System.Net;
global using System.Net.Http;
global using System.Net.Http.Headers;
global using System.Text;
global using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
<OutputType>Library</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="5.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="6.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.12" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink.Loader" Version="14.1.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LittleBlocks.AspNetCore\LittleBlocks.AspNetCore.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="NSubstitute" Version="4.4.0" />
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System.Net;
using ILogger = Microsoft.Extensions.Logging.ILogger;

namespace LittleBlocks.AspNetCore.ActionFilters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System.Net;

namespace LittleBlocks.AspNetCore.Dignostics;

public sealed class DiagnosticsMiddleware
Expand Down
30 changes: 15 additions & 15 deletions src/LittleBlocks.AspNetCore/LittleBlocks.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@
<IsPackable>true</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentValidation.AspNetCore" Version="9.5.1" />
<PackageReference Include="Microsoft.FeatureManagement.AspNetCore" Version="2.2.0" />
<PackageReference Include="FluentValidation.AspNetCore" Version="11.2.2" />
<PackageReference Include="Microsoft.FeatureManagement.AspNetCore" Version="2.5.1" />
<PackageReference Include="Foil" Version="1.0.37" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="5.0.3" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="RestEase" Version="1.5.2" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.AspNetCore" Version="3.4.0" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.1.3" />
<PackageReference Include="Serilog.Enrichers.Process" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.12" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.12" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.12" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="RestEase" Version="1.6.1" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.2.0" />
<PackageReference Include="Serilog.Enrichers.Process" Version="2.0.2" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageReference Include="Serilog.Sinks.Literate" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.0.7" />
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="5.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="6.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LittleBlocks.Configurations\LittleBlocks.Configurations.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private void ConfigureLogger<TStartup>(LoggerConfiguration loggerConfiguration,
retainedFileCountLimit: options.LogFilesToRetain,
fileSizeLimitBytes: options.LogFileSizeLimitInBytes,
flushToDiskInterval: options.FlushToDiskInterval)
.WriteTo.LiterateConsole()
.WriteTo.Console()
.WriteTo.InMemoryCache();

LoggingLevelSwitchProvider.Instance.MinimumLevel =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,22 @@ public static IServiceCollection AddDefaultMvc<TStartup>(this IServiceCollection
options.Filters.Add(typeof(LoggingActionFilter));
options.Filters.Add(typeof(ValidateModelStateActionFilter));
})
.AddNewtonsoftJson(o => o.SerializerSettings.ConfigureJsonSettings())
.AddFluentValidation(fv => fv.RegisterValidatorsFromDomain<TStartup>(prefix));
.AddNewtonsoftJson(o => o.SerializerSettings.ConfigureJsonSettings());

services.AddFluentValidationAutoValidation().AddFluentValidationClientsideAdapters();
services.RegisterValidatorsFromDomain<TStartup>(prefix);
return services;
}

private static void RegisterValidatorsFromDomain<T>(this FluentValidationMvcConfiguration config,
private static void RegisterValidatorsFromDomain<T>(this IServiceCollection services,
string assemblyNameStartsWith) where T : class
{
if (config == null) throw new ArgumentNullException(nameof(config));
if (services == null) throw new ArgumentNullException(nameof(services));
if (string.IsNullOrWhiteSpace(assemblyNameStartsWith))
throw new ArgumentException("Value cannot be null or whitespace.", nameof(assemblyNameStartsWith));

var assemblies = GetReferencedAssembliesFromType<T>(assemblyNameStartsWith);
config.RegisterValidatorsFromAssemblies(assemblies);
services.AddValidatorsFromAssemblies(assemblies);
}

private static IEnumerable<Assembly> GetReferencedAssembliesFromType<T>(string assemblyNameStartsWith)
Expand Down
6 changes: 3 additions & 3 deletions src/LittleBlocks.Bootstrap/LittleBlocks.Bootstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<Version>1.0.0</Version>
<LangVersion>10</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<Version>1.0.0</Version>
<LangVersion>10</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentValidation" Version="9.5.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="5.0.0" />
<PackageReference Include="FluentValidation" Version="11.4.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="6.0.0" />
</ItemGroup>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<Version>1.0.0</Version>
<LangVersion>10</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Include="Scrutor" Version="3.3.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Scrutor" Version="4.2.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System.Net;

namespace LittleBlocks.ExceptionHandling.UnitTests;

public sealed class BasicHttpStatusCodeRecommendationProviderTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System.Net;
using System.Net.Http;

namespace LittleBlocks.ExceptionHandling.UnitTests.ErrorBuilder;

public sealed class ErrorBuilderForApiExceptionTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System.Net;

namespace LittleBlocks.ExceptionHandling.UnitTests;

public sealed class ErrorResponseProviderTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="NSubstitute" Version="4.4.0" />
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System.Net;

namespace LittleBlocks.ExceptionHandling.Domain;

public sealed class InternalErrorResponse
Expand Down
2 changes: 2 additions & 0 deletions src/LittleBlocks.ExceptionHandling/IHttpStatusCodeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System.Net;

namespace LittleBlocks.ExceptionHandling;

public interface IHttpStatusCodeProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<Version>1.0.0</Version>
<LangVersion>10</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="RestEase" Version="1.5.2" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="RestEase" Version="1.6.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System.Net;

namespace LittleBlocks.ExceptionHandling.Providers;

public sealed class DefaultHttpStatusCodeProvider : IHttpStatusCodeProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion src/LittleBlocks.Extensions/LittleBlocks.Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<Version>1.0.0</Version>
<LangVersion>10</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Hosting.WindowsServices" Version="5.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="5.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.WindowsServices" Version="6.0.12" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/LittleBlocks.Http/HttpRequestExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System.Net.Http;

namespace LittleBlocks.Http;

public static class HttpRequestExtensions
Expand Down
6 changes: 5 additions & 1 deletion src/LittleBlocks.Http/LittleBlocks.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<Version>1.0.0</Version>
<LangVersion>10</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Security.Principal" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.Net.Http" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<Version>1.0.0</Version>
<LangVersion>10</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<Version>1.0.0</Version>
<LangVersion>10</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Logentries" Version="4.0.0" />
</ItemGroup>

Expand Down
Loading

0 comments on commit 17833b8

Please sign in to comment.