Remove unusued build targets/props
This commit is contained in:
parent
f90c9cc693
commit
2b117da4ab
|
|
@ -27,75 +27,5 @@
|
||||||
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Key.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Key.snk</AssemblyOriginatorKeyFile>
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
||||||
<GitInfoFile>$(MSBuildThisFileDirectory)artifacts\GitInfo.cs</GitInfoFile>
|
|
||||||
<GitInfoProps>$(MSBuildThisFileDirectory)artifacts\GitInfo.props</GitInfoProps>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Target Name="CollectGitInfo">
|
|
||||||
<PropertyGroup>
|
|
||||||
<GitInfoCommitCount Condition="'$(COMMIT_HASH)' != ''">$(COMMIT_COUNT)</GitInfoCommitCount>
|
|
||||||
<GitInfoCommitHash Condition="'$(COMMIT_HASH)' != ''">$(COMMIT_HASH)</GitInfoCommitHash>
|
|
||||||
<GitExitCode>0</GitExitCode>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Exec Command="git rev-list --count HEAD" ConsoleToMSBuild="true" Condition="'$(COMMIT_HASH)' == ''" IgnoreExitCode="true">
|
|
||||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitCount" />
|
|
||||||
<Output TaskParameter="ExitCode" PropertyName="GitExitCode" />
|
|
||||||
</Exec>
|
|
||||||
|
|
||||||
<Exec Command="git rev-parse HEAD" ConsoleToMSBuild="true" Condition="'$(COMMIT_HASH)' == ''" IgnoreExitCode="true">
|
|
||||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitHash" />
|
|
||||||
<Output TaskParameter="ExitCode" PropertyName="GitExitCode" />
|
|
||||||
</Exec>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(GitExitCode)' != '0'">
|
|
||||||
<GitInfoCommitCount>0</GitInfoCommitCount>
|
|
||||||
<GitInfoCommitHash>UNKNOWN</GitInfoCommitHash>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<GitCommitInfoContent>
|
|
||||||
<![CDATA[
|
|
||||||
[assembly: System.Reflection.AssemblyVersion("$(AssemblyReleaseVersion)")]
|
|
||||||
[assembly: System.Reflection.AssemblyFileVersion("$(AssemblyReleaseVersion)")]
|
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersion("$(PackageVersion)+$(GitInfoCommitCount).$(GitInfoCommitHash)")]
|
|
||||||
|
|
||||||
namespace Microsoft.TemplateEngine
|
|
||||||
{
|
|
||||||
internal static class GitInfo
|
|
||||||
{
|
|
||||||
public static string CommitCount { get%3B } = "$(GitInfoCommitCount)"%3B
|
|
||||||
public static string CommitHash { get%3B } = "$(GitInfoCommitHash)"%3B
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]]>
|
|
||||||
</GitCommitInfoContent>
|
|
||||||
<GitInfoPropsContent>
|
|
||||||
<![CDATA[
|
|
||||||
<Project ToolsVersion="15.0">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Version>$(PackageReleaseVersion)</Version>
|
|
||||||
<FileVersion>$(PackageReleaseVersion)</FileVersion>
|
|
||||||
<InformationalVersion>$(PackageVersion)+$(GitInfoCommitCount).$(GitInfoCommitHash)</InformationalVersion>
|
|
||||||
<PackageReleaseNotes>Commit Hash: $(GitInfoCommitHash)</PackageReleaseNotes>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
]]>
|
|
||||||
</GitInfoPropsContent>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<WriteLinesToFile File="$(GitInfoFile)"
|
|
||||||
Lines="$(GitCommitInfoContent)"
|
|
||||||
Overwrite="true" />
|
|
||||||
|
|
||||||
<WriteLinesToFile File="$(GitInfoProps)"
|
|
||||||
Lines="$(GitInfoPropsContent)"
|
|
||||||
Overwrite="true" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="$(GitInfoFile)" Condition="Exists('$(GitInfoFile)')" Link="%(RecursiveDir)%(Filename)%(Extension)" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)src/GitInfo.cs" Condition="!Exists('$(GitInfoFile)')" Link="%(RecursiveDir)%(Filename)%(Extension)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<Import Project="$(GitInfoProps)" Condition="Exists('$(GitInfoProps)')" />
|
|
||||||
</Project>
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue