Skip to content

Commit a0e8501

Browse files
authored
Merge pull request #1373 from lahma/single-version-source
Use Directory.Build.props as single source of version information
2 parents c36964d + 1c3e4bd commit a0e8501

File tree

7 files changed

+15
-153
lines changed

7 files changed

+15
-153
lines changed

Directory.Build.props

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<Project>
22
<PropertyGroup>
33
<LangVersion>latest</LangVersion>
4-
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
54

65
<PublishRepositoryUrl>true</PublishRepositoryUrl>
76
<EmbedUntrackedSources>true</EmbedUntrackedSources>
87
<IncludeSymbols>true</IncludeSymbols>
98
<DebugType>portable</DebugType>
109
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
1110

12-
<VersionPrefix>2.7.0</VersionPrefix>
11+
<VersionPrefix>2.7.1</VersionPrefix>
1312
<Title>NPOI</Title>
1413
<Authors>Tony Qu,NPOI Contributors</Authors>
1514
<Owners>Nissl Lab</Owners>

OpenXmlFormats/Properties/AssemblyInfo.cs

+1-36
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,6 @@
1-
using System.Reflection;
2-
using System.Runtime.CompilerServices;
3-
using System.Runtime.InteropServices;
1+
using System.Runtime.CompilerServices;
42
using System.Security;
53

6-
// General Information about an assembly is controlled through the following
7-
// set of attributes. Change these attribute values to modify the information
8-
// associated with an assembly.
9-
[assembly: AssemblyTitle("NPOI OpenXmlFormats")]
10-
[assembly: AssemblyDescription("")]
11-
[assembly: AssemblyConfiguration("")]
12-
[assembly: AssemblyCompany("Nissl")]
13-
[assembly: AssemblyProduct("NPOI")]
14-
[assembly: AssemblyCopyright("Apache 2.0")]
15-
[assembly: AssemblyTrademark("NPOI")]
16-
[assembly: AssemblyCulture("")]
17-
18-
// Setting ComVisible to false makes the types in this assembly not visible
19-
// to COM components. If you need to access a type in this assembly from
20-
// COM, set the ComVisible attribute to true on that type.
21-
[assembly: ComVisible(false)]
22-
23-
// The following GUID is for the ID of the typelib if this project is exposed to COM
24-
[assembly: Guid("c67494d1-2eff-42d6-b0e5-063c750e4f2f")]
25-
26-
// Version information for an assembly consists of the following four values:
27-
//
28-
// Major Version
29-
// Minor Version
30-
// Build Number
31-
// Revision
32-
//
33-
// You can specify all the values or you can default the Build and Revision Numbers
34-
// by using the '*' as shown below:
35-
// [assembly: AssemblyVersion("1.0.*")]
36-
[assembly: AssemblyVersion("2.7.1.0")]
37-
[assembly: AssemblyFileVersion("2.7.1.0")]
38-
[assembly: AssemblyInformationalVersion("2.0.0.0")]
394
#if NETSTANDARD2_1 || NET6_0_OR_GREATER || NETSTANDARD2_0 || NET40
405
[assembly: AllowPartiallyTrustedCallers]
416
#endif

build/Build.GitHubAction.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[GitHubActions("CI",
44
GitHubActionsImage.WindowsLatest,
55
GitHubActionsImage.UbuntuLatest,
6-
OnPushBranches = new[] { "main", "master", "release*" },
6+
OnPushBranches = new[] { "main", "master", "release*", "poi/*" },
77
InvokedTargets = new[] { nameof(Clean), nameof(Test), nameof(Pack) },
88
TimeoutMinutes = 20,
99
CacheKeyFiles = new string[0]

build/Build.cs

+9-1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ static void DeleteCompilationArtifacts()
106106
// need to use escaped separator in order for this to work
107107
.AddProperty("NoWarn", string.Join("%3B", new [] { 169, 612, 618, 1591, 1587, 1570, 1572, 1573, 1574 }))
108108
.SetProjectFile(Solution)
109+
// ensure we don't generate too much output in CI run
110+
// 0 Turns off emission of all warning messages
111+
// 1 Displays severe warning messages
112+
.SetWarningLevel(IsServerBuild ? 0 : 1)
109113
);
110114

111115
// copy files from projects in order to get them to be part of pack
@@ -158,7 +162,11 @@ static void DeleteCompilationArtifacts()
158162
// obsolete missing XML documentation comment, XML comment on not valid language element, XML comment has badly formed XML, no matching tag in XML comment
159163
// need to use escaped separator in order for this to work
160164
.AddProperty("NoWarn", string.Join("%3B", new[] { 169, 612, 618, 1591, 1587, 1570, 1572, 1573, 1574 }))
161-
.SetProperty("EnablePackageValidation", "false");
165+
.SetProperty("EnablePackageValidation", "false")
166+
// ensure we don't generate too much output in CI run
167+
// 0 Turns off emission of all warning messages
168+
// 1 Displays severe warning messages
169+
.SetWarningLevel(IsServerBuild ? 0 : 1);
162170

163171
if (IsPublishBuild)
164172
{

main/Properties/AssemblyInfo.cs

+1-37
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,6 @@
1-
using System.Reflection;
2-
using System.Runtime.CompilerServices;
3-
using System.Runtime.InteropServices;
1+
using System.Runtime.CompilerServices;
42
using System.Security;
53

6-
// General Information about an assembly is controlled through the following
7-
// set of attributes. Change these attribute values to modify the information
8-
// associated with an assembly.
9-
[assembly: AssemblyTitle("NPOI")]
10-
[assembly: AssemblyDescription("")]
11-
[assembly: AssemblyConfiguration("")]
12-
[assembly: AssemblyCompany("Nissl")]
13-
[assembly: AssemblyProduct("NPOI")]
14-
[assembly: AssemblyCopyright("Apache 2.0")]
15-
[assembly: AssemblyTrademark("NPOI")]
16-
[assembly: AssemblyCulture("")]
17-
18-
// Setting ComVisible to false makes the types in this assembly not visible
19-
// to COM components. If you need to access a type in this assembly from
20-
// COM, set the ComVisible attribute to true on that type.
21-
[assembly: ComVisible(false)]
22-
23-
// The following GUID is for the ID of the typelib if this project is exposed to COM
24-
[assembly: Guid("9bf85b73-8802-42ad-b83f-0ab48190b835")]
25-
26-
// Version information for an assembly consists of the following four values:
27-
//
28-
// Major Version
29-
// Minor Version
30-
// Build Number
31-
// Revision
32-
//
33-
// You can specify all the values or you can default the Build and Revision Numbers
34-
// by using the '*' as shown below:
35-
// [assembly: AssemblyVersion("1.0.*")]
36-
[assembly: AssemblyVersion("2.7.1.0")]
37-
[assembly: AssemblyFileVersion("2.7.1.0")]
38-
[assembly: AssemblyInformationalVersion("2.0.0.0")]
39-
404
[assembly: InternalsVisibleTo("NPOI.TestCases, PublicKey=002400000480000094000000060200000024000052534131000400000100010095ccd95af3b39d8bc20544d3f47fd24b53ebc5ccb693eaed116290629f8cd882c827ebd511ad59449224f0718d3f9d03b64945a6c8b6644266001b8c8426185330e3d96da70ae16d4acc21b8d4d480f1385c7e924273179375aa88f81380a72fb115712a313379d16aed4aa36208ee3b4a5dd785b06a07b2d868e3227f4495b5", AllInternalsVisible = true)]
415
#if NETSTANDARD2_1 || NET6_0_OR_GREATER || NETSTANDARD2_0 || NET40
426
[assembly: AllowPartiallyTrustedCallers]

ooxml/Properties/AssemblyInfo.cs

+1-39
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,6 @@
1-
using System.Reflection;
2-
using System.Runtime.CompilerServices;
3-
using System.Runtime.InteropServices;
1+
using System.Runtime.CompilerServices;
42
using System.Security;
53

6-
// General Information about an assembly is controlled through the following
7-
// set of attributes. Change these attribute values to modify the information
8-
// associated with an assembly.
9-
[assembly: AssemblyTitle("NPOI OOXML")]
10-
[assembly: AssemblyDescription("")]
11-
[assembly: AssemblyConfiguration("")]
12-
[assembly: AssemblyCompany("Nissl")]
13-
[assembly: AssemblyProduct("NPOI")]
14-
[assembly: AssemblyCopyright("Apache 2.0")]
15-
[assembly: AssemblyTrademark("NPOI")]
16-
[assembly: AssemblyCulture("")]
17-
18-
// Setting ComVisible to false makes the types in this assembly not visible
19-
// to COM components. If you need to access a type in this assembly from
20-
// COM, set the ComVisible attribute to true on that type.
21-
[assembly: ComVisible(false)]
22-
23-
// The following GUID is for the ID of the typelib if this project is exposed to COM
24-
[assembly: Guid("cc03d84d-498a-4561-97c1-e39d5d7780a0")]
25-
26-
// Version information for an assembly consists of the following four values:
27-
//
28-
// Major Version
29-
// Minor Version
30-
// Build Number
31-
// Revision
32-
//
33-
// You can specify all the values or you can default the Build and Revision Numbers
34-
// by using the '*' as shown below:
35-
// [assembly: AssemblyVersion("1.0.*")]
36-
[assembly: AssemblyVersion("2.7.1.0")]
37-
[assembly: AssemblyFileVersion("2.7.1.0")]
38-
[assembly: AssemblyInformationalVersion("2.0.0.0")]
39-
40-
//[assembly: InternalsVisibleTo("ooxml.Testcases")]
41-
424
[assembly: InternalsVisibleTo("NPOI.OOXML.TestCases, PublicKey=002400000480000094000000060200000024000052534131000400000100010095ccd95af3b39d8bc20544d3f47fd24b53ebc5ccb693eaed116290629f8cd882c827ebd511ad59449224f0718d3f9d03b64945a6c8b6644266001b8c8426185330e3d96da70ae16d4acc21b8d4d480f1385c7e924273179375aa88f81380a72fb115712a313379d16aed4aa36208ee3b4a5dd785b06a07b2d868e3227f4495b5", AllInternalsVisible = true)]
435
#if NETSTANDARD2_1 || NET6_0_OR_GREATER || NETSTANDARD2_0 || NET40
446
[assembly: AllowPartiallyTrustedCallers]

openxml4Net/Properties/AssemblyInfo.cs

+1-37
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,5 @@
1-
using System.Reflection;
2-
using System.Runtime.CompilerServices;
3-
using System.Runtime.InteropServices;
4-
using System.Security;
1+
using System.Security;
52

6-
// General Information about an assembly is controlled through the following
7-
// set of attributes. Change these attribute values to modify the information
8-
// associated with an assembly.
9-
[assembly: AssemblyTitle("NPOI OpenXml4Net")]
10-
[assembly: AssemblyDescription("")]
11-
[assembly: AssemblyConfiguration("")]
12-
[assembly: AssemblyCompany("Nissl")]
13-
[assembly: AssemblyProduct("NPOI")]
14-
[assembly: AssemblyCopyright("Apache 2.0")]
15-
[assembly: AssemblyTrademark("NPOI")]
16-
[assembly: AssemblyCulture("")]
17-
18-
// Setting ComVisible to false makes the types in this assembly not visible
19-
// to COM components. If you need to access a type in this assembly from
20-
// COM, set the ComVisible attribute to true on that type.
21-
[assembly: ComVisible(false)]
22-
23-
// The following GUID is for the ID of the typelib if this project is exposed to COM
24-
[assembly: Guid("13f2a810-331a-40b6-8d7a-1322b405fab7")]
25-
26-
// Version information for an assembly consists of the following four values:
27-
//
28-
// Major Version
29-
// Minor Version
30-
// Build Number
31-
// Revision
32-
//
33-
// You can specify all the values or you can default the Build and Revision Numbers
34-
// by using the '*' as shown below:
35-
// [assembly: AssemblyVersion("1.0.*")]
36-
[assembly: AssemblyVersion("2.7.1.0")]
37-
[assembly: AssemblyFileVersion("2.7.1.0")]
38-
[assembly: AssemblyInformationalVersion("2.0.0.0")]
393
#if NETSTANDARD2_1 || NET6_0_OR_GREATER || NETSTANDARD2_0 || NET40
404
[assembly: AllowPartiallyTrustedCallers]
415
#endif

0 commit comments

Comments
 (0)