From 362cf9ff0e9867e1801a32f1c5c684ef1cdfa400 Mon Sep 17 00:00:00 2001 From: Patrick Schork <354473+pschork@users.noreply.github.com> Date: Fri, 14 Jun 2024 15:57:53 -0700 Subject: [PATCH] Fix GitVersion tag regex to properly identify release tags in detached HEAD mode Previously if you created a tag `v0.7.4-pre.1` it would resolve semver as `0.7.4-tags-v0-7-4-pre-1.1` --- GitVersion.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/GitVersion.yml b/GitVersion.yml index 062979b1e0..dc9cab7572 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -7,8 +7,7 @@ branches: prevent-increment-of-merged-branch-version: true track-merge-target: false regex: ^master$|^main$ - source-branches: - - release + source-branches: [] tracks-release-branches: true is-release-branch: false is-mainline: true @@ -19,10 +18,8 @@ branches: increment: None prevent-increment-of-merged-branch-version: true track-merge-target: false - regex: ^v\d+\.\d+\.\d+$|^releases?[/-] - source-branches: - - main - - release + regex: ^tags/v\d+\.\d+\.\d+(-[a-z]+\.\d+)?|^releases?[/-] + source-branches: [] tracks-release-branches: false is-release-branch: true is-mainline: false