Skip to content

Commit 76d4b1f

Browse files
chusemanarturcic
authored andcommitted
Add GitVersion_NoNormalizeEnabled property for GitVersionTask
1 parent fd6ba11 commit 76d4b1f

File tree

5 files changed

+36
-20
lines changed

5 files changed

+36
-20
lines changed

src/GitVersionTask.MsBuild/GitVersionTaskBase.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ public abstract class GitVersionTaskBase : Task
1111
public string ConfigFilePath { get; set; }
1212

1313
public bool NoFetch { get; set; }
14+
15+
public bool NoNormalize { get; set; }
1416
}
1517
}

src/GitVersionTask/GitVersionTasks.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ private static IServiceProvider BuildServiceProvider(GitVersionTaskBase task)
6363
{
6464
TargetPath = task.SolutionDirectory,
6565
ConfigFile = task.ConfigFilePath,
66-
NoFetch = task.NoFetch
66+
NoFetch = task.NoFetch,
67+
NoNormalize = task.NoNormalize
6768
};
6869

6970
services.AddSingleton(_ => Options.Create(arguments));

src/GitVersionTask/build/GitVersionTask.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<GitVersionPath Condition="'$(GitVersionPath)' == ''">$(MSBuildProjectDirectory)</GitVersionPath>
1010

1111
<GitVersion_NoFetchEnabled Condition="$(GitVersion_NoFetchEnabled) == ''">false</GitVersion_NoFetchEnabled>
12+
<GitVersion_NoNormalizeEnabled Condition="$(GitVersion_NoNormalizeEnabled) == ''">false</GitVersion_NoNormalizeEnabled>
1213

1314
<DisableGitVersionTask Condition=" '$(DisableGitVersionTask)' == '' ">false</DisableGitVersionTask>
1415

src/GitVersionTask/build/GitVersionTask.targets

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,23 @@
77

88
<Target Name="WriteVersionInfoToBuildLog" BeforeTargets="CoreCompile;GetAssemblyVersion;GenerateNuspec" Condition="$(WriteVersionInfoToBuildLog) == 'true'">
99

10-
<WriteVersionInfoToBuildLog SolutionDirectory="$(GitVersionPath)" ConfigFilePath="$(GitVersionConfig)" NoFetch="$(GitVersion_NoFetchEnabled)"/>
10+
<WriteVersionInfoToBuildLog SolutionDirectory="$(GitVersionPath)"
11+
ConfigFilePath="$(GitVersionConfig)"
12+
NoFetch="$(GitVersion_NoFetchEnabled)"
13+
NoNormalize="$(GitVersion_NoNormalizeEnabled)" />
1114

1215
</Target>
1316

1417
<Target Name="UpdateAssemblyInfo" BeforeTargets="CoreCompile" Condition="$(UpdateAssemblyInfo) == 'true'">
1518

16-
<UpdateAssemblyInfo
17-
SolutionDirectory="$(GitVersionPath)"
18-
ConfigFilePath="$(GitVersionConfig)"
19-
NoFetch="$(GitVersion_NoFetchEnabled)"
20-
ProjectFile="$(MSBuildProjectFullPath)"
21-
IntermediateOutputPath="$(IntermediateOutputPath)"
22-
Language="$(Language)"
23-
CompileFiles ="@(Compile)">
19+
<UpdateAssemblyInfo SolutionDirectory="$(GitVersionPath)"
20+
ConfigFilePath="$(GitVersionConfig)"
21+
NoFetch="$(GitVersion_NoFetchEnabled)"
22+
NoNormalize="$(GitVersion_NoNormalizeEnabled)"
23+
ProjectFile="$(MSBuildProjectFullPath)"
24+
IntermediateOutputPath="$(IntermediateOutputPath)"
25+
Language="$(Language)"
26+
CompileFiles ="@(Compile)">
2427

2528
<Output TaskParameter="AssemblyInfoTempFilePath" PropertyName="AssemblyInfoTempFilePath" />
2629
</UpdateAssemblyInfo>
@@ -36,13 +39,13 @@
3639

3740
<Target Name="GenerateGitVersionInformation" BeforeTargets="CoreCompile" Condition="$(GenerateGitVersionInformation) == 'true'">
3841

39-
<GenerateGitVersionInformation
40-
SolutionDirectory="$(GitVersionPath)"
41-
ConfigFilePath="$(GitVersionConfig)"
42-
NoFetch="$(GitVersion_NoFetchEnabled)"
43-
ProjectFile="$(MSBuildProjectFullPath)"
44-
IntermediateOutputPath="$(IntermediateOutputPath)"
45-
Language="$(Language)">
42+
<GenerateGitVersionInformation SolutionDirectory="$(GitVersionPath)"
43+
ConfigFilePath="$(GitVersionConfig)"
44+
NoFetch="$(GitVersion_NoFetchEnabled)"
45+
NoNormalize="$(GitVersion_NoNormalizeEnabled)"
46+
ProjectFile="$(MSBuildProjectFullPath)"
47+
IntermediateOutputPath="$(IntermediateOutputPath)"
48+
Language="$(Language)">
4649

4750
<Output TaskParameter="GitVersionInformationFilePath" PropertyName="GitVersionInformationFilePath" />
4851
</GenerateGitVersionInformation>
@@ -59,7 +62,10 @@
5962

6063
<Target Name="GetVersion" BeforeTargets="CoreCompile;GetAssemblyVersion;GenerateNuspec;_GenerateRestoreProjectSpec;_GetOutputItemsFromPack;EnsureWixToolsetInstalled" Condition="$(GetVersion) == 'true'">
6164

62-
<GetVersion SolutionDirectory="$(GitVersionPath)" ConfigFilePath="$(GitVersionConfig)" NoFetch="$(GitVersion_NoFetchEnabled)">
65+
<GetVersion SolutionDirectory="$(GitVersionPath)"
66+
ConfigFilePath="$(GitVersionConfig)"
67+
NoFetch="$(GitVersion_NoFetchEnabled)"
68+
NoNormalize="$(GitVersion_NoNormalizeEnabled)">
6369
<Output TaskParameter="Major" PropertyName="GitVersion_Major" />
6470
<Output TaskParameter="Minor" PropertyName="GitVersion_Minor" />
6571
<Output TaskParameter="Patch" PropertyName="GitVersion_Patch" />

src/GitVersionTask/buildMultiTargeting/GitVersionTask.targets

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
<UsingTask TaskName="WriteVersionInfoToBuildLog" AssemblyFile="$(GitVersionAssemblyFile)" />
55

66
<Target Name="WriteVersionInfoToBuildLog" BeforeTargets="CoreCompile;GetAssemblyVersion;GenerateNuspec" Condition="$(WriteVersionInfoToBuildLog) == 'true'">
7-
<WriteVersionInfoToBuildLog SolutionDirectory="$(GitVersionPath)" ConfigFilePath="$(GitVersionConfig)" NoFetch="$(GitVersion_NoFetchEnabled)"/>
7+
<WriteVersionInfoToBuildLog SolutionDirectory="$(GitVersionPath)"
8+
ConfigFilePath="$(GitVersionConfig)"
9+
NoFetch="$(GitVersion_NoFetchEnabled)"
10+
NoNormalize="$(GitVersion_NoNormalizeEnabled)" />
811
</Target>
912

1013
<Target Name="UpdateAssemblyInfo" DependsOnTargets="_UpdateAssemblyInfo;DispatchToInnerBuilds" />
@@ -22,7 +25,10 @@
2225
</Target>
2326

2427
<Target Name="GetVersion" BeforeTargets="CoreCompile;GetAssemblyVersion;GenerateNuspec;_GenerateRestoreProjectSpec;EnsureWixToolsetInstalled" Condition="$(GetVersion) == 'true'">
25-
<GetVersion SolutionDirectory="$(GitVersionPath)" ConfigFilePath="$(GitVersionConfig)" NoFetch="$(GitVersion_NoFetchEnabled)">
28+
<GetVersion SolutionDirectory="$(GitVersionPath)"
29+
ConfigFilePath="$(GitVersionConfig)"
30+
NoFetch="$(GitVersion_NoFetchEnabled)"
31+
NoNormalize="$(GitVersion_NoNormalizeEnabled)">
2632
<Output TaskParameter="Major" PropertyName="GitVersion_Major" />
2733
<Output TaskParameter="Minor" PropertyName="GitVersion_Minor" />
2834
<Output TaskParameter="Patch" PropertyName="GitVersion_Patch" />

0 commit comments

Comments
 (0)