Refactor GitVersion configuration in project file to prioritize safe version composition from MSBuild properties
This commit is contained in:
parent
f6a1aae622
commit
daead29d31
1 changed files with 3 additions and 1 deletions
|
|
@ -13,7 +13,9 @@
|
|||
<RepositoryUrl>https://gitlab.com/MaddoScientisto/aifotoonlus</RepositoryUrl>
|
||||
<!-- Use GitVersion MSBuild properties to set package version during CI/build. Provide fallback if variable is not defined.
|
||||
Sanitize the GitVersion output to remove characters invalid for NuGet (e.g., braces) -->
|
||||
<GitVersionRaw>$(GitVersion_NuGetVersionV2)</GitVersionRaw>
|
||||
<!-- Prefer composing a safe version from concrete GitVersion MSBuild properties when available -->
|
||||
<GitVersionRaw Condition="'$(GitVersion_MajorMinorPatch)' != ''">$(GitVersion_MajorMinorPatch)-$(GitVersion_EscapedBranchName).$(GitVersion_PreReleaseNumber)</GitVersionRaw>
|
||||
<GitVersionRaw Condition="'$(GitVersionRaw)' == ''">$(GitVersion_NuGetVersionV2)</GitVersionRaw>
|
||||
<GitVersionSanitized>$([System.Text.RegularExpressions.Regex]::Replace('$(GitVersionRaw)','[{}]',''))</GitVersionSanitized>
|
||||
<Version Condition="'$(GitVersionSanitized)' != ''">$(GitVersionSanitized)</Version>
|
||||
<Version Condition="'$(GitVersionSanitized)' == ''">0.1.0</Version>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue