Skip to content

Commit 2b62fbc

Browse files
committed
#674: License can now be supplied via the REPORTGENERATOR_LICENSE environment variable
1 parent f42c5be commit 2b62fbc

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/Readme.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ For further details take a look at LICENSE.txt.
6767

6868
CHANGELOG
6969

70+
5.3.5.0
71+
72+
* New: #674: License can now be supplied via the REPORTGENERATOR_LICENSE environment variable
73+
7074
5.3.4.0
7175

7276
* New: #664: Added filter options for risk hotspots: '-riskhotspotassemblyfilters:', '-riskhotspotclassfilters:'

src/ReportGenerator.Core/ReportConfigurationBuilder.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ public ReportConfiguration Create(Dictionary<string, string> cliArguments)
252252
title = value;
253253
}
254254

255+
string licenseFromEnviroment = Environment.GetEnvironmentVariable("REPORTGENERATOR_LICENSE");
256+
255257
if (namedArguments.TryGetValue(CommandLineArgumentNames.License, out value))
256258
{
257259
license = value;
@@ -260,6 +262,10 @@ public ReportConfiguration Create(Dictionary<string, string> cliArguments)
260262
{
261263
license = value;
262264
}
265+
else if (licenseFromEnviroment != null)
266+
{
267+
license = licenseFromEnviroment;
268+
}
263269

264270
return new ReportConfiguration(
265271
reportFilePatterns,

0 commit comments

Comments
 (0)