Skip to content

Commit 45e1099

Browse files
committed
Added Tag prefix support to Task
1 parent 1589271 commit 45e1099

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

GitVersionTask/AssemblyInfoBuilder/UpdateAssemblyInfo.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public class UpdateAssemblyInfo : Task
1616

1717
public string ReleaseBranchTag { get; set; }
1818

19+
public string TagPrefix { get; set; }
20+
1921
[Required]
2022
public string SolutionDirectory { get; set; }
2123

@@ -97,6 +99,11 @@ public void InnerExecute()
9799
config.ReleaseBranchTag = ReleaseBranchTag;
98100
}
99101

102+
if (TagPrefix != null)
103+
{
104+
config.TagPrefix = TagPrefix;
105+
}
106+
100107
CachedVersion semanticVersion;
101108
if (!VersionAndBranchFinder.TryGetVersion(SolutionDirectory, out semanticVersion, config))
102109
{

GitVersionTask/GetVersion.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ public class GetVersion : Task
7676

7777
public string ReleaseBranchTag { get; set; }
7878

79+
public string TagPrefix { get; set; }
80+
7981
TaskLogger logger;
8082

8183
public GetVersion()
@@ -105,6 +107,11 @@ public override bool Execute()
105107
config.ReleaseBranchTag = ReleaseBranchTag;
106108
}
107109

110+
if (TagPrefix != null)
111+
{
112+
config.TagPrefix = TagPrefix;
113+
}
114+
108115
if (VersionAndBranchFinder.TryGetVersion(SolutionDirectory, out versionAndBranch, config))
109116
{
110117
var thisType = typeof(GetVersion);

0 commit comments

Comments
 (0)