Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherMann committed Jan 31, 2025
1 parent f1ba036 commit 8a9ef2c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Use GitFlow to get access to support branches
workflow: GitFlow/v1
# Microsoft recommends to only change the major version of assemblies
# to reduce the amount of assembly redirect. Use MajorMinor until
# 1.0.0 is released (as 0.x.z to 0.y.0 might contain breaking changes).
assembly-versioning-scheme: MajorMinor
branches:
release:
Expand Down
5 changes: 4 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ trigger:
- support/*

variables:
GIT_BRANCH: ${{ iif(startsWith(variables['Build.SourceBranch'], 'refs/tags'), '', variables['Build.SourceBranch']) }}
# The Azure Pipelines integration of GitVersion normalizes tag names
# incorrectly. Hence, we override it here.
# See https://github.com/GitTools/GitVersion/pull/4400
GIT_BRANCH: ${{ iif(startsWith(variables['Build.SourceBranch'], 'refs/tags/'), '', variables['Build.SourceBranch']) }}

jobs:
- job: Build
Expand Down
10 changes: 9 additions & 1 deletion src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<Project>
<!-- Update the package version for beta releases such that the
CI builds receive unique prereleae labels.
-->
<Target Name="DbosoftPackageVersion" DependsOnTargets="GetVersion" BeforeTargets="$(GitVersionTargetsBefore)">
<PropertyGroup Condition=" '$(UpdateVersionProperties)' == 'true' ">
<PackageVersion Condition=" '$(UseFullSemVerForNuGet)' == 'true' ">$(GitVersion_FullSemVer.Replace('+','-ci.'))</PackageVersion>
<PackageVersion Condition=" '$(UseFullSemVerForNuGet)' == 'true' ">
$([System.Text.RegularExpressions.Regex]::Replace(
$(GitVersion_FullSemVer),
'^([vV]?\d+\.\d+\.\d+)(-beta\.)(\d+)\+(\d+)',
'$1-0beta.$3.$4'))
</PackageVersion>
</PropertyGroup>
</Target>
</Project>

0 comments on commit 8a9ef2c

Please sign in to comment.