Clean up unused build code.

This commit is contained in:
Eric Erhardt 2017-05-11 08:59:38 -05:00
parent fcb334e30a
commit 928c510c84
6 changed files with 2 additions and 86 deletions

View file

@ -45,8 +45,7 @@
<GenerateMsiVersion CommitCount="$(CommitCount)"
VersionMajor="$(VersionMajor)"
VersionMinor="$(VersionMinor)"
VersionPatch="$(VersionPatch)"
ReleaseSuffix="$(ReleaseSuffix)">
VersionPatch="$(VersionPatch)">
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
</GenerateMsiVersion>

View file

@ -1,53 +0,0 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using Microsoft.DotNet.PlatformAbstractions;
namespace Microsoft.DotNet.Cli.Build.Framework
{
public static class CurrentArchitecture
{
public static BuildArchitecture Current
{
get
{
return DetermineCurrentArchitecture();
}
}
public static bool Isx86
{
get
{
var archName = RuntimeEnvironment.RuntimeArchitecture;
return string.Equals(archName, "x86", StringComparison.OrdinalIgnoreCase);
}
}
public static bool Isx64
{
get
{
var archName = RuntimeEnvironment.RuntimeArchitecture;
return string.Equals(archName, "x64", StringComparison.OrdinalIgnoreCase);
}
}
private static BuildArchitecture DetermineCurrentArchitecture()
{
if (Isx86)
{
return BuildArchitecture.x86;
}
else if (Isx64)
{
return BuildArchitecture.x64;
}
else
{
return default(BuildArchitecture);
}
}
}
}

View file

@ -1,11 +0,0 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DotNet.Cli.Build.Framework
{
public enum BuildArchitecture
{
x86 = 1,
x64 = 2
}
}

View file

@ -3,7 +3,6 @@
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System.Runtime.InteropServices;
namespace Microsoft.DotNet.Cli.Build
{
@ -21,20 +20,16 @@ namespace Microsoft.DotNet.Cli.Build
[Required]
public int VersionPatch { get; set; }
[Required]
public string ReleaseSuffix { get; set; }
[Output]
public string MsiVersion { get; set; }
public override bool Execute()
{
var buildVersion = new BuildVersion()
var buildVersion = new Version()
{
Major = VersionMajor,
Minor = VersionMinor,
Patch = VersionPatch,
ReleaseSuffix = ReleaseSuffix,
CommitCount = CommitCount
};

View file

@ -1,12 +0,0 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
namespace Microsoft.DotNet.Cli.Build
{
public class BuildVersion : Version
{
public string VersionSuffix => $"{ReleaseSuffix}-{CommitCountString}";
}
}

View file

@ -9,8 +9,6 @@ namespace Microsoft.DotNet.Cli.Build
public virtual int Minor { get; set; }
public virtual int Patch { get; set; }
public virtual int CommitCount { get; set; }
public virtual string CommitCountString => CommitCount.ToString("000000");
public virtual string ReleaseSuffix { get; set; }
public string GenerateMsiVersion()
{