Make build output clearer (log info, don't pack irrelevant project)
This commit is contained in:
parent
378c93e7d6
commit
9f4d43c295
|
|
@ -2,7 +2,6 @@
|
|||
<Import Project="..\Directory.Build.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<EnableDefaultItems>False</EnableDefaultItems>
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<IncludeBuildOutput>False</IncludeBuildOutput>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<OutputType>Library</OutputType>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.Build.Utilities;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
|
@ -28,15 +29,30 @@ namespace DependencyUpdater
|
|||
// to the output location and then modify the copy.
|
||||
var outFile = Path.Combine(OutDir, Path.GetFileName(NupkgFile));
|
||||
File.Copy(NupkgFile, outFile, true);
|
||||
|
||||
|
||||
var numProjectFiles = 0;
|
||||
using (var zipFile = ZipFile.Open(outFile, ZipArchiveMode.Update))
|
||||
{
|
||||
foreach (var projectFile in zipFile.Entries.Where(IsProjectFile))
|
||||
{
|
||||
numProjectFiles++;
|
||||
PerformVariableSubstitutions(projectFile, substitutionsDict);
|
||||
}
|
||||
}
|
||||
|
||||
if (numProjectFiles == 0)
|
||||
{
|
||||
Log.LogMessage(
|
||||
MessageImportance.High,
|
||||
$"No project files found in {Path.GetFileName(outFile)}, so no variables substituted.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.LogMessage(
|
||||
MessageImportance.High,
|
||||
$"Substituted variables in {numProjectFiles} project file(s) in {Path.GetFileName(outFile)}");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue