From 1a92d6079647c886572612629a70ba2c92e0bb3a Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Tue, 21 Feb 2023 23:42:52 +0000 Subject: [PATCH] Replace / and \ in branches with dashes Do this only when setting a default Version since otherwise the build fails. But we don't want to change the determined GitBranch so it remains accurate. Closes #244. --- src/GitInfo/build/GitInfo.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitInfo/build/GitInfo.targets b/src/GitInfo/build/GitInfo.targets index e09e5ad..a94c01a 100644 --- a/src/GitInfo/build/GitInfo.targets +++ b/src/GitInfo/build/GitInfo.targets @@ -571,7 +571,7 @@ - $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)+$(GitBranch).$(GitCommit) + $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)+$(GitBranch.Replace('/', '-').Replace('\', '-')).$(GitCommit) $(Version)