Skip to content

Commit

Permalink
chenged opencover report from coverage.xml to opencovercoverage.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosrodcam committed Feb 25, 2018
1 parent 3f04db7 commit 29b6814
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $MiniCover uninstrument
$MiniCover htmlreport --threshold 90
$MiniCover xmlreport --threshold 90
$MiniCover report --threshold 90
$MiniCover opencoverreport --threshold 90 --output opencovercoverage.xml
$MiniCover opencoverreport --threshold 90

if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ]; then
dotnet pack src/MiniCover -c Release --output $PWD/artifacts --version-suffix ci-`date +%Y%m%d%H%M%S`
Expand Down
9 changes: 7 additions & 2 deletions src/MiniCover/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static int Main(string[] args)
var workDirOption = CreateWorkdirOption(command);
var coverageFileOption = CreateCoverageFileOption(command);
var thresholdOption = CreateThresholdOption(command);
var outputOption = command.Option("--output", "Output file for OpenCover report [default: coverage.xml]", CommandOptionType.SingleValue);
var outputOption = command.Option("--output", "Output file for OpenCover report [default: opencovercoverage.xml]", CommandOptionType.SingleValue);
command.HelpOption("-h | --help");

command.OnExecute(() =>
Expand All @@ -160,7 +160,7 @@ static int Main(string[] args)
var coverageFile = GetCoverageFile(coverageFileOption);
var threshold = GetThreshold(thresholdOption);
var result = LoadCoverageFile(coverageFile);
var output = GetXmlReportOutput(outputOption);
var output = GetOpenCoverXmlReportOutput(outputOption);
OpenCoverReport.Execute(result, output, threshold);
return 0;
});
Expand Down Expand Up @@ -239,6 +239,11 @@ private static string GetXmlReportOutput(CommandOption outputOption)
return outputOption.Value() ?? "coverage.xml";
}

private static string GetOpenCoverXmlReportOutput(CommandOption outputOption)
{
return outputOption.Value() ?? "opencovercoverage.xml";
}

private static string GetCoverageFile(CommandOption coverageFileOption)
{
return coverageFileOption.Value() ?? "coverage.json";
Expand Down

0 comments on commit 29b6814

Please sign in to comment.