Skip to content

Commit

Permalink
outputting variables and undoing that change
Browse files Browse the repository at this point in the history
  • Loading branch information
StanleyGoldman committed Sep 25, 2018
1 parent 069be30 commit 9173225
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions build/Tasks/CodeCoverage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,20 @@ public override void Run(Context context)
{
context.Information("Uploading Coverage Files: {0}", string.Join(",", coverageFiles.Select(path => path.GetFilename().ToString())));

context.Information($"Current GitVersion_SemVer: {context.EnvironmentVariable("GitVersion_SemVer")}");
context.Information($"Current APPVEYOR_BUILD_VERSION: {context.EnvironmentVariable("APPVEYOR_BUILD_VERSION")}");

var userProfilePath = context.EnvironmentVariable("USERPROFILE");
var codecovPath = new DirectoryPath(userProfilePath)
.CombineWithFilePath(".nuget\\packages\\codecov\\1.1.0\\tools\\codecov.exe");

context.Tools.RegisterFile(codecovPath);

context.Information($"Environment Variable: {context.EnvironmentVariable("GitVersion_SemVer")}");
context.Information($"Current APPVEYOR_BUILD_VERSION: {context.EnvironmentVariable("APPVEYOR_BUILD_VERSION")}");

var buildVersion = string.Format("{0}{1}",
context.EnvironmentVariable("GitVersion_SemVer"),
context.BuildSystem().AppVeyor.Environment.Build.Version
);

foreach (var coverageFile in coverageFiles)
{
var settings = new CodecovSettings
{
Files = new [] { coverageFile.MakeAbsolute(context.Environment).FullPath },
EnvironmentVariables = new Dictionary<string, string> { { "APPVEYOR_BUILD_VERSION", buildVersion } }
Files = new [] { coverageFile.MakeAbsolute(context.Environment).FullPath }
};

context.Codecov(settings);
Expand Down

0 comments on commit 9173225

Please sign in to comment.