Address PR comments
This commit is contained in:
parent
64ccab43e8
commit
483e6bd9c1
7 changed files with 17 additions and 37 deletions
|
@ -7,9 +7,6 @@
|
||||||
<Import Project="build/Microsoft.DotNet.Cli.Monikers.props" />
|
<Import Project="build/Microsoft.DotNet.Cli.Monikers.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Architecture Condition=" '$(OverrideArchitecture)' != '' ">$(OverrideArchitecture)</Architecture>
|
|
||||||
<Rid Condition=" '$(OverrideRid)' != '' ">$(OverrideRid)</Rid>
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
$(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
|
$(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
|
||||||
-->
|
-->
|
||||||
|
|
|
@ -16,10 +16,6 @@
|
||||||
|
|
||||||
<Target Name="InitializeCommonProps"
|
<Target Name="InitializeCommonProps"
|
||||||
DependsOnTargets="BuildDotnetCliBuildFramework" >
|
DependsOnTargets="BuildDotnetCliBuildFramework" >
|
||||||
<GetVersionBadgeMoniker>
|
|
||||||
<Output TaskParameter="VersionBadgeMoniker" PropertyName="VersionBadgeMoniker" />
|
|
||||||
</GetVersionBadgeMoniker>
|
|
||||||
|
|
||||||
<!-- Common Properties -->
|
<!-- Common Properties -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<IsDesktopAvailable>False</IsDesktopAvailable>
|
<IsDesktopAvailable>False</IsDesktopAvailable>
|
||||||
|
@ -52,6 +48,11 @@
|
||||||
<VersionSuffix>$(ReleaseSuffix)-$(CommitCount)</VersionSuffix>
|
<VersionSuffix>$(ReleaseSuffix)-$(CommitCount)</VersionSuffix>
|
||||||
<NugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(VersionSuffix)</NugetVersion>
|
<NugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(VersionSuffix)</NugetVersion>
|
||||||
|
|
||||||
|
<VersionBadgeMoniker>$(OSName)_$(Architecture)</VersionBadgeMoniker>
|
||||||
|
<VersionBadgeMoniker Condition=" '$(Rid)' == 'ubuntu.16.04-x64' ">Ubuntu_16_04_x64</VersionBadgeMoniker>
|
||||||
|
<VersionBadgeMoniker Condition=" '$(Rid)' == 'fedora.23-x64' ">Fedora_23_x64</VersionBadgeMoniker>
|
||||||
|
<VersionBadgeMoniker Condition=" '$(Rid)' == 'opensuse.13.2-x64' ">openSUSE_13_2_x64</VersionBadgeMoniker>
|
||||||
|
|
||||||
<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
|
<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
|
||||||
<SdkVersion>$(NugetVersion)</SdkVersion>
|
<SdkVersion>$(NugetVersion)</SdkVersion>
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
<UsingTask TaskName="GetCommitCount" AssemblyFile="$(CLIBuildDll)" />
|
<UsingTask TaskName="GetCommitCount" AssemblyFile="$(CLIBuildDll)" />
|
||||||
<UsingTask TaskName="GetCommitHash" AssemblyFile="$(CLIBuildDll)" />
|
<UsingTask TaskName="GetCommitHash" AssemblyFile="$(CLIBuildDll)" />
|
||||||
<UsingTask TaskName="GetCurrentRuntimeInformation" AssemblyFile="$(CLIBuildDll)" />
|
<UsingTask TaskName="GetCurrentRuntimeInformation" AssemblyFile="$(CLIBuildDll)" />
|
||||||
<UsingTask TaskName="GetVersionBadgeMoniker" AssemblyFile="$(CLIBuildDll)" />
|
|
||||||
<UsingTask TaskName="MakeRelative" AssemblyFile="$(CLIBuildDll)" />
|
<UsingTask TaskName="MakeRelative" AssemblyFile="$(CLIBuildDll)" />
|
||||||
<UsingTask TaskName="RemoveAssetFromDepsPackages" AssemblyFile="$(CLIBuildDll)" />
|
<UsingTask TaskName="RemoveAssetFromDepsPackages" AssemblyFile="$(CLIBuildDll)" />
|
||||||
<UsingTask TaskName="ReplaceFileContents" AssemblyFile="$(CLIBuildDll)" />
|
<UsingTask TaskName="ReplaceFileContents" AssemblyFile="$(CLIBuildDll)" />
|
||||||
|
|
|
@ -36,7 +36,12 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
protected override void LogEventsFromTextOutput(string line, MessageImportance importance)
|
protected override void LogEventsFromTextOutput(string line, MessageImportance importance)
|
||||||
{
|
{
|
||||||
CommitCount = line;
|
var buildVersion = new BuildVersion()
|
||||||
|
{
|
||||||
|
CommitCount = int.Parse(line)
|
||||||
|
};
|
||||||
|
|
||||||
|
CommitCount = buildVersion.CommitCountString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +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 Microsoft.Build.Framework;
|
|
||||||
using Microsoft.Build.Utilities;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli.Build
|
|
||||||
{
|
|
||||||
public class GetVersionBadgeMoniker : Task
|
|
||||||
{
|
|
||||||
[Output]
|
|
||||||
public string VersionBadgeMoniker { get; set; }
|
|
||||||
|
|
||||||
public override bool Execute()
|
|
||||||
{
|
|
||||||
VersionBadgeMoniker = Monikers.GetBadgeMoniker();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -110,11 +110,11 @@ $env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
|
||||||
if ($NoBuild)
|
if ($NoBuild)
|
||||||
{
|
{
|
||||||
Write-Host "Not building due to --nobuild"
|
Write-Host "Not building due to --nobuild"
|
||||||
Write-Host "Command that would be run: 'dotnet msbuild build.proj /m /p:OverrideArchitecture=$Architecture $ExtraParameters'"
|
Write-Host "Command that would be run: 'dotnet msbuild build.proj /m /p:Architecture=$Architecture $ExtraParameters'"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dotnet msbuild build.proj /p:OverrideArchitecture=$Architecture /p:GeneratingPropsFile=true /t:WriteDynamicPropsToStaticPropsFiles
|
dotnet msbuild build.proj /p:Architecture=$Architecture /p:GeneratingPropsFile=true /t:WriteDynamicPropsToStaticPropsFiles
|
||||||
dotnet msbuild build.proj /m /v:diag /p:OverrideArchitecture=$Architecture $ExtraParameters
|
dotnet msbuild build.proj /m /v:diag /p:Architecture=$Architecture $ExtraParameters
|
||||||
if($LASTEXITCODE -ne 0) { throw "Failed to build" }
|
if($LASTEXITCODE -ne 0) { throw "Failed to build" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,9 +179,9 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||||
echo "${args[@]}"
|
echo "${args[@]}"
|
||||||
|
|
||||||
if [ $BUILD -eq 1 ]; then
|
if [ $BUILD -eq 1 ]; then
|
||||||
dotnet msbuild build.proj /p:OverrideArchitecture=$ARCHITECTURE /p:GeneratingPropsFile=true /t:WriteDynamicPropsToStaticPropsFiles
|
dotnet msbuild build.proj /p:Architecture=$ARCHITECTURE /p:GeneratingPropsFile=true /t:WriteDynamicPropsToStaticPropsFiles
|
||||||
dotnet msbuild build.proj /m /v:diag /p:OverrideArchitecture=$ARCHITECTURE "${args[@]}"
|
dotnet msbuild build.proj /m /v:diag /p:Architecture=$ARCHITECTURE "${args[@]}"
|
||||||
else
|
else
|
||||||
echo "Not building due to --nobuild"
|
echo "Not building due to --nobuild"
|
||||||
echo "Command that would be run is: 'dotnet msbuild build.proj /m /p:OverrideArchitecture=$ARCHITECTURE ${args[@]}'"
|
echo "Command that would be run is: 'dotnet msbuild build.proj /m /p:Architecture=$ARCHITECTURE ${args[@]}'"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue