Clean up unused build code.
This commit is contained in:
parent
fcb334e30a
commit
928c510c84
6 changed files with 2 additions and 86 deletions
|
@ -45,8 +45,7 @@
|
|||
<GenerateMsiVersion CommitCount="$(CommitCount)"
|
||||
VersionMajor="$(VersionMajor)"
|
||||
VersionMinor="$(VersionMinor)"
|
||||
VersionPatch="$(VersionPatch)"
|
||||
ReleaseSuffix="$(ReleaseSuffix)">
|
||||
VersionPatch="$(VersionPatch)">
|
||||
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
||||
</GenerateMsiVersion>
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
@ -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}";
|
||||
}
|
||||
}
|
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue