Skip to content

Commit 8c6ab50

Browse files
committed
Merge pull request #537 from sharwell/fix-535
Updated the generated output to include an "auto-generated" header
2 parents 7e6b1b3 + 344e800 commit 8c6ab50

7 files changed

+67
-6
lines changed

src/GitVersionTask.Tests/AssemblyInfoBuilderTests.VerifyAssemblyVersion_Major.approved.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
using System;
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
// GitVersion
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost if
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
11+
using System;
212
using System.Reflection;
313

414
[assembly: AssemblyVersion("2.0.0.0")]

src/GitVersionTask.Tests/AssemblyInfoBuilderTests.VerifyAssemblyVersion_MajorMinor.approved.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
using System;
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
// GitVersion
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost if
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
11+
using System;
212
using System.Reflection;
313

414
[assembly: AssemblyVersion("2.3.0.0")]

src/GitVersionTask.Tests/AssemblyInfoBuilderTests.VerifyAssemblyVersion_MajorMinorPatch.approved.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
using System;
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
// GitVersion
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost if
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
11+
using System;
212
using System.Reflection;
313

414
[assembly: AssemblyVersion("2.3.4.0")]

src/GitVersionTask.Tests/AssemblyInfoBuilderTests.VerifyAssemblyVersion_MajorMinorPatchTag.approved.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
using System;
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
// GitVersion
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost if
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
11+
using System;
212
using System.Reflection;
313

414
[assembly: AssemblyVersion("2.3.4.5")]

src/GitVersionTask.Tests/AssemblyInfoBuilderTests.VerifyCreatedCode.approved.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
using System;
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
// GitVersion
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost if
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
11+
using System;
212
using System.Reflection;
313

414
[assembly: AssemblyVersion("1.2.3.0")]

src/GitVersionTask.Tests/GitVersionTask.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@
210210
<Content Include="AssemblyInfoBuilderTests.VerifyAssemblyVersion_Major.approved.txt" />
211211
<Content Include="AssemblyInfoBuilderTests.VerifyAssemblyVersion_MajorMinor.approved.txt" />
212212
<Content Include="AssemblyInfoBuilderTests.VerifyAssemblyVersion_MajorMinorPatch.approved.txt" />
213+
<Content Include="AssemblyInfoBuilderTests.VerifyAssemblyVersion_MajorMinorPatchTag.approved.txt" />
213214
<Content Include="AssemblyInfoBuilderTests.VerifyCreatedCode.approved.txt" />
214215
<Content Include="FodyWeavers.xml" />
215216
<Content Include="Resources\.gitattributes" />

src/GitVersionTask/AssemblyInfoBuilder/AssemblyInfoBuilder.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,17 @@ public string GetAssemblyInfoText(VersionVariables vars, string assemblyName)
1010
var v = vars.ToList();
1111

1212
var assemblyInfo = string.Format(
13-
@"using System;
13+
@"//------------------------------------------------------------------------------
14+
// <auto-generated>
15+
// This code was generated by a tool.
16+
// GitVersion
17+
//
18+
// Changes to this file may cause incorrect behavior and will be lost if
19+
// the code is regenerated.
20+
// </auto-generated>
21+
//------------------------------------------------------------------------------
22+
23+
using System;
1424
using System.Reflection;
1525
1626
[assembly: AssemblyVersion(""{0}"")]

0 commit comments

Comments
 (0)