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)"
|
<GenerateMsiVersion CommitCount="$(CommitCount)"
|
||||||
VersionMajor="$(VersionMajor)"
|
VersionMajor="$(VersionMajor)"
|
||||||
VersionMinor="$(VersionMinor)"
|
VersionMinor="$(VersionMinor)"
|
||||||
VersionPatch="$(VersionPatch)"
|
VersionPatch="$(VersionPatch)">
|
||||||
ReleaseSuffix="$(ReleaseSuffix)">
|
|
||||||
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
||||||
</GenerateMsiVersion>
|
</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.Framework;
|
||||||
using Microsoft.Build.Utilities;
|
using Microsoft.Build.Utilities;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli.Build
|
namespace Microsoft.DotNet.Cli.Build
|
||||||
{
|
{
|
||||||
|
@ -21,20 +20,16 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[Required]
|
[Required]
|
||||||
public int VersionPatch { get; set; }
|
public int VersionPatch { get; set; }
|
||||||
|
|
||||||
[Required]
|
|
||||||
public string ReleaseSuffix { get; set; }
|
|
||||||
|
|
||||||
[Output]
|
[Output]
|
||||||
public string MsiVersion { get; set; }
|
public string MsiVersion { get; set; }
|
||||||
|
|
||||||
public override bool Execute()
|
public override bool Execute()
|
||||||
{
|
{
|
||||||
var buildVersion = new BuildVersion()
|
var buildVersion = new Version()
|
||||||
{
|
{
|
||||||
Major = VersionMajor,
|
Major = VersionMajor,
|
||||||
Minor = VersionMinor,
|
Minor = VersionMinor,
|
||||||
Patch = VersionPatch,
|
Patch = VersionPatch,
|
||||||
ReleaseSuffix = ReleaseSuffix,
|
|
||||||
CommitCount = CommitCount
|
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 Minor { get; set; }
|
||||||
public virtual int Patch { get; set; }
|
public virtual int Patch { get; set; }
|
||||||
public virtual int CommitCount { get; set; }
|
public virtual int CommitCount { get; set; }
|
||||||
public virtual string CommitCountString => CommitCount.ToString("000000");
|
|
||||||
public virtual string ReleaseSuffix { get; set; }
|
|
||||||
|
|
||||||
public string GenerateMsiVersion()
|
public string GenerateMsiVersion()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue