Skip to content

Commit ce444a5

Browse files
claudekhellang
authored andcommitted
Integrate MinVer for Git-based versioning
Add MinVer 6.0.0 package for automatic version calculation from Git tags: - MinVer automatically determines version from Git tags (e.g., v6.1.0) - Generates proper semantic versions with pre-release identifiers - Integrates with build height for automatic patch increments - VersionPrefix (6.1.0) serves as fallback when no tags exist - MinVerTagPrefix set to 'v' to match conventional tag format Benefits: - Eliminates manual version updates in project files - Automatic versioning in CI/CD pipelines - Proper pre-release versioning for feature branches - Consistent with deterministic builds Microsoft.SourceLink.GitHub is already at latest version 8.0.0. Version calculation examples: - On tag v6.1.0: produces version 6.1.0 - After tag: produces version 6.1.1-alpha.0.{height} - On branch: includes branch name in pre-release identifier
1 parent c066306 commit ce444a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Scrutor/Scrutor.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>Register services using assembly scanning and a fluent API.</Description>
4+
<!-- MinVer will calculate version from Git tags. VersionPrefix is fallback when no tags exist. -->
45
<VersionPrefix>6.1.0</VersionPrefix>
6+
<MinVerTagPrefix>v</MinVerTagPrefix>
57
<Authors>Kristian Hellang</Authors>
68
<TargetFrameworks>net462;netstandard2.0;net8.0;net10.0</TargetFrameworks>
79
<NoWarn>$(NoWarn);CS1591</NoWarn>
@@ -35,6 +37,7 @@
3537
</ItemGroup>
3638

3739
<ItemGroup>
40+
<PackageReference Include="MinVer" Version="6.0.0" PrivateAssets="All" />
3841
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" PrivateAssets="All" />
3942
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
4043
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />

0 commit comments

Comments
 (0)