Skip to content

Commit

Permalink
V1.0.8
Browse files Browse the repository at this point in the history
- Update README.md to reflect support for .NET 8.0
-Automate version number updating on README.md
  • Loading branch information
monoman committed Jul 31, 2024
1 parent 4986a3d commit d1b3e9a
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PackageTags>Collections Ordered</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Version>1.0.7</Version>
<Version>1.0.8</Version>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>preview</AnalysisLevel>
Expand Down Expand Up @@ -48,5 +48,50 @@
<Message Importance="high" Text="Pushed $(LatestPackage) to Nuget" Condition="!$(VersionAlreadyPushed)" />
<Message Importance="high" Text="Didn't push $(LatestPackage) to Nuget - Already there" Condition="$(VersionAlreadyPushed)" />
</Target>

<Target Name="UpdateREADME" BeforeTargets="Build">
<ItemGroup>
<ReadMe Include="..\README.md" />
</ItemGroup>
<PropertyGroup>
<VersionPattern>__Commons.Collections.SquareList \d+\.\d+\.\d+</VersionPattern>
<VersionResult>__Commons.Collections.SquareList $(Version)</VersionResult>
</PropertyGroup>
<RegexTemplating InputFile="@(ReadMe)" Pattern="$(VersionPattern)" NewValue="$(VersionResult)"/>
</Target>

<UsingTask TaskName="RegexTemplating"
TaskFactory="RoslynCodeTaskFactory"
AssemblyFile="$(MSBuildBinPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<InputFile ParameterType="System.String" Required="true" />
<Pattern ParameterType="System.String" Required="true" />
<NewValue ParameterType="System.String" Required="true" />
<OutputFile ParameterType="System.String" />
<Verbose ParameterType="System.Boolean" />
</ParameterGroup>
<Task>
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Text" />
<Using Namespace="System.Text.RegularExpressions" />
<Code Type="Fragment" Language="C#">
<![CDATA[
if (File.Exists(InputFile)) {
if (string.IsNullOrWhiteSpace(OutputFile))
OutputFile = InputFile;
var contentBefore = File.ReadAllText(InputFile, Encoding.UTF8);
var contentAfter = Regex.Replace(contentBefore, Pattern, NewValue);
if (contentAfter != contentBefore || OutputFile != InputFile) {
File.WriteAllBytes(OutputFile, Encoding.UTF8.GetBytes(contentAfter));
if (Verbose)
Log.LogMessageFromText($"Replaced the pattern '{Pattern}' by the value '{NewValue}' on '{OutputFile}'!", MessageImportance.High);
}
} else
Log.LogMessageFromText($"InputFile '{InputFile}' not found!", MessageImportance.High);
]]>
</Code>
</Task>
</UsingTask>

</Project>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016-2021 Rafael 'Monoman' Teixeira
Copyright (c) 2016-2024 Rafael 'Monoman' Teixeira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,21 @@ His implementation in C used circular doubly-linked lists of doubly-linked lists
The SquareList is a structure that is particularly useful in applications that frequently require the current minimum and maximum values, as they both can be found in constant time, even accounting for deletions.
This implementation performs insert/delete/find operations within a worst-case running time of O(sqrt(n)) [In truth O(n) for inserts]. Values are always kept in ascending order, so traversing it in that order is natural and performant.

__Commons.Collections.SquareList 1.0.6 is available at Nuget:__ [Commons.Collections.SquareList](https://www.nuget.org/packages/Commons.Collections.SquareList/).
__Commons.Collections.SquareList 1.0.8 is available at Nuget:__ [Commons.Collections.SquareList](https://www.nuget.org/packages/Commons.Collections.SquareList/).

Targets in the package
---

|_Release_|_.NET Standard 1.0_|_.NET Standard 2.1_|_.NET 6.0_|
|--------:|------------------:|------------------:|---------:|
| 1.0.0 || | |
| 1.0.2 | || |
| 1.0.3 | |||
| 1.0.4 ||||
| 1.0.5 ||||
| 1.0.6 ||||
|_Release_|_.NET Standard 1.0_|_.NET Standard 2.1_|_.NET 6.0_|_.NET 8.0_|
|--------:|------------------:|------------------:|---------:|---------:|
| 1.0.0 || | | |
| 1.0.2 | || | |
| 1.0.3 | ||| |
| 1.0.4 |||| |
| 1.0.5 |||| |
| 1.0.6 |||| |
| 1.0.7 |||||
| 1.0.8 |||||

Performance
===
Expand Down

0 comments on commit d1b3e9a

Please sign in to comment.