提交 817859ae 编写于 作者: J Jared Parsons 提交者: GitHub

Merge pull request #20283 from jaredpar/fix-des

Include Commit in our NuGet package
......@@ -7,11 +7,12 @@ using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml.Linq;
string usage = @"usage: BuildNuGets.csx <binaries-dir> <build-version> <output-directory>";
string usage = @"usage: BuildNuGets.csx <binaries-dir> <build-version> <output-directory> <git sha>";
if (Args.Count() != 3)
if (Args.Count() != 4)
{
Console.WriteLine(usage);
Environment.Exit(1);
......@@ -33,6 +34,17 @@ var BuildingReleaseNugets = IsReleaseVersion(BuildVersion);
var NuspecDirPath = Path.Combine(SolutionRoot, "src/NuGet");
var OutDir = Path.GetFullPath(Args[2]).TrimEnd('\\');
var CommitSha = Args[3].Replace("<", "").Replace(">", "");
var CommitIsDeveloperBuild = CommitSha == "<developer build>";
if (!CommitIsDeveloperBuild && !Regex.IsMatch(CommitSha, "[A-Fa-f0-9]+"))
{
Console.WriteLine("Invalid Git sha value: expected <developer build> or a valid sha");
Environment.Exit(1);
}
var CommitPathMessage = CommitIsDeveloperBuild
? "This an unofficial build from a developer's machine"
: $"This package was built from the source at https://github.com/dotnet/roslyn/commit/{CommitSha}";
var LicenseUrlRedist = @"http://go.microsoft.com/fwlink/?LinkId=529443";
var LicenseUrlNonRedist = @"http://go.microsoft.com/fwlink/?LinkId=529444";
var LicenseUrlTest = @"http://go.microsoft.com/fwlink/?LinkId=529445";
......@@ -205,7 +217,8 @@ int PackFiles(string[] nuspecFiles, string licenseUrl)
{ "projectURL", ProjectURL },
{ "tags", Tags },
{ "emptyDirPath", emptyDir },
{ "additionalFilesPath", NuGetAdditionalFilesPath }
{ "additionalFilesPath", NuGetAdditionalFilesPath },
{ "commitPathMessage", CommitPathMessage }
};
foreach (var dependencyVersion in dependencyVersions)
......
......@@ -6,6 +6,8 @@
<description>
Contains the build task and targets used by MSBuild to run the C# and VB compilers.
Supports using VBCSCompiler on Windows.
$commitPathMessage$
</description>
<dependencies>
<group targetFramework="netstandard1.3">
......
......@@ -2,9 +2,10 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata minClientVersion="3.3">
<id>Microsoft.CodeAnalysis.CSharp.CodeStyle</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") code style analyzers for C#.
</description>
</summary>
<description>$commitPathMessage$</description>
<dependencies>
</dependencies>
......
......@@ -2,9 +2,10 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata minClientVersion="3.3">
<id>Microsoft.CodeAnalysis.CSharp.Features</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") support for creating C# editing experiences.
</description>
</summary>
<description>$commitPathMessage$</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.Features" version="$version$" />
<dependency id="Microsoft.CodeAnalysis.CSharp.Workspaces" version="$version$" />
......
......@@ -3,10 +3,7 @@
<metadata>
<id>Microsoft.CodeAnalysis.CSharp.Scripting</id>
<summary>Microsoft .NET Compiler Platform ("Roslyn") CSharp scripting package.</summary>
<description>
Microsoft .NET Compiler Platform ("Roslyn") CSharp scripting package.
</description>
<description>$commitPathMessage$</description>
<language>en-US</language>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<version>$version$</version>
......
......@@ -2,9 +2,10 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata minClientVersion="3.3">
<id>Microsoft.CodeAnalysis.CSharp.Workspaces</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") support for analyzing C# projects and solutions.
</description>
</summary>
<description>$commitPathMessage$</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.CSharp" version="[$version$]" />
<dependency id="Microsoft.CodeAnalysis.Workspaces.Common" version="[$version$]" />
......
......@@ -2,11 +2,12 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata minClientVersion="3.3">
<id>Microsoft.CodeAnalysis.CSharp</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") support for C#, Microsoft.CodeAnalysis.CSharp.dll.
More details at https://aka.ms/roslyn-packages
</description>
</summary>
<description>$commitPathMessage$</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.Common" version="[$version$]" />
</dependencies>
......
......@@ -5,6 +5,8 @@
<summary>A shared package used by the Microsoft .NET Compiler Platform ("Roslyn").</summary>
<description>
A shared package used by the Microsoft .NET Compiler Platform ("Roslyn"). Do not install this package manually, it will be added as a prerequisite by other packages that require it.
$commitPathMessage$
</description>
<dependencies>
<group targetFramework="netstandard1.3">
......
......@@ -7,6 +7,8 @@
.NET Compiler Platform ("Roslyn"). Install this package to get both C# and Visual Basic support. Install either of the dependencies directly to get one of the languages separately.
More details at https://aka.ms/roslyn-packages
$commitPathMessage$
</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.CSharp" version="[$version$]" />
......
......@@ -2,11 +2,14 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.CodeAnalysis.EditorFeatures.Text</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") support for working with Visual Studio text buffers.
</summary>
<description>
Supported Platforms:
- .NET Framework 4.6
Supported Platforms:
- .NET Framework 4.6
$commitPathMessage$
</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.Workspaces.Common" version="[$version$]" />
......
......@@ -2,11 +2,14 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.CodeAnalysis.EditorFeatures</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") support for editor features inside the Visual Studio editor..
</summary>
<description>
Supported Platforms:
- .NET Framework 4.6
Supported Platforms:
- .NET Framework 4.6
$commitPathMessage$
</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.Features" version="[$version$]" />
......
......@@ -2,9 +2,10 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata minClientVersion="3.3">
<id>Microsoft.CodeAnalysis.Features</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") support for creating editing experiences.
</description>
</summary>
<description>$commitPathMessage$</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.Workspaces.Common" version="$version$" />
</dependencies>
......
......@@ -10,6 +10,8 @@
Supported Platforms:
- .NET Framework 4.6
$commitPathMessage$
</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.Remote.Workspaces" version="[$version$]" />
......
......@@ -10,6 +10,8 @@
Supported Platforms:
- .NET Framework 4.6
$commitPathMessage$
</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.Remote.Workspaces" version="[$version$]" />
......
......@@ -10,6 +10,8 @@
Supported Platforms:
- .NET Framework 4.6
$commitPathMessage$
</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.Common" version="[$version$]" />
......
......@@ -5,6 +5,8 @@
<summary>Microsoft .NET Compiler Platform ("Roslyn") shared scripting package.</summary>
<description>
Microsoft .NET Compiler Platform ("Roslyn") shared scripting package. Do not install this package manually, it will be added as a prerequisite by other packages that require it.
$commitPathMessage$
</description>
<language>en-US</language>
......
......@@ -5,6 +5,8 @@
<summary>Microsoft .NET Compiler Platform ("Roslyn") CSharp and VB scripting package.</summary>
<description>
Microsoft .NET Compiler Platform ("Roslyn") CSharp and VB scripting package.
$commitPathMessage$
</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.CSharp.Scripting" version="[$version$]" />
......
......@@ -2,9 +2,10 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata minClientVersion="3.3">
<id>Microsoft.CodeAnalysis.VisualBasic.CodeStyle</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") code style analyzers for Visual Basic.
</description>
</summary>
<description>$commitPathMessage$</description>
<dependencies>
</dependencies>
......
......@@ -2,9 +2,10 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata minClientVersion="3.3">
<id>Microsoft.CodeAnalysis.VisualBasic.Features</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") support for creating Visual Basic editing experiences.
</description>
</summary>
<description>$commitPathMessage$</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.Features" version="$version$" />
<dependency id="Microsoft.CodeAnalysis.VisualBasic.Workspaces" version="$version$" />
......
......@@ -5,6 +5,8 @@
<summary>Microsoft .NET Compiler Platform ("Roslyn") Visual Basic scripting package.</summary>
<description>
Microsoft .NET Compiler Platform ("Roslyn") Visual Basic scripting package.
$commitPathMessage$
</description>
<language>en-US</language>
......
......@@ -2,9 +2,10 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata minClientVersion="3.3">
<id>Microsoft.CodeAnalysis.VisualBasic.Workspaces</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") support for analyzing Visual Basic projects and solutions.
</description>
</summary>
<description>$commitPathMessage$</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.VisualBasic" version="[$version$]" />
<dependency id="Microsoft.CodeAnalysis.Workspaces.Common" version="[$version$]" />
......
......@@ -2,11 +2,12 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata minClientVersion="3.3">
<id>Microsoft.CodeAnalysis.VisualBasic</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") support for Visual Basic, Microsoft.CodeAnalysis.VisualBasic.dll.
More details at https://aka.ms/roslyn-packages
</description>
</summary>
<description>$commitPathMessage$</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.Common" version="$version$" />
</dependencies>
......
......@@ -7,6 +7,8 @@
</summary>
<description>
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it.
$commitPathMessage$
</description>
<dependencies>
<group targetFramework="netstandard1.3">
......
......@@ -12,6 +12,8 @@
- "Microsoft.CodeAnalysis.Compilers" (both compilers)
- "Microsoft.CodeAnalysis.CSharp" (only the C# compiler)
- "Microsoft.CodeAnalysis.VisualBasic (only the VB compiler)
$commitPathMessage$
</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.CSharp.Workspaces" version="[$version$]" />
......
......@@ -2,9 +2,10 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.NETCore.Compilers</id>
<description>
<summary>
CoreCLR-compatible versions of the C# and VB compilers for use in MSBuild.
</description>
</summary>
<description>$commitPathMessage$</description>
<language>en-US</language>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<version>$version$</version>
......
......@@ -2,12 +2,13 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.Net.CSharp.Interactive.netcore</id>
<description>
<summary>
CoreCLR-compatible version of csi.exe.
Supported Platforms:
- .NET Core (NETCoreApp1.0)
</description>
</summary>
<description>$commitPathMessage$</description>
<language>en-US</language>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<version>$version$</version>
......
......@@ -2,9 +2,10 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.Net.Compilers.netcore</id>
<description>
<summary>
CoreCLR-compatible versions of the C# and VB compilers.
</description>
</summary>
<description>$commitPathMessage$</description>
<language>en-US</language>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<version>$version$</version>
......
......@@ -2,11 +2,12 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.Net.Compilers</id>
<description>
<summary>
.Net Compilers package. Referencing this package will cause the project to be built using the specific version of the C# and Visual Basic compilers contained in the package, as opposed to any system installed version.
This package can be used to compile code targeting any platform, but can only be run using the desktop .NET 4.6+ Full Framework.
</description>
</summary>
<description>$commitPathMessage$</description>
<language>en-US</language>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<version>$version$</version>
......
......@@ -2,7 +2,8 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.VisualStudio.IntegrationTest.Utilities</id>
<description>Utility methods used to run Visual Studio integration tests.</description>
<summary>Utility methods used to run Visual Studio integration tests.</summary>
<description>$commitPathMessage$</description>
<language>en-US</language>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<version>$version$</version>
......
......@@ -2,12 +2,13 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.VisualStudio.LanguageServices.Next</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") support for Visual Studio "15".
Supported Platforms:
- .NET Framework 4.6
</description>
</summary>
<description>$commitPathMessage$</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.Remote.ServiceHub" version="[$version$]" />
<dependency id="Microsoft.CodeAnalysis.Remote.Workspaces" version="[$version$]" />
......
......@@ -2,11 +2,14 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.VisualStudio.LanguageServices.Razor.RemoteClient</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") support for Visual Studio "15".
</summary>
<description>
Supported Platforms:
- .NET Framework 4.6
Supported Platforms:
- .NET Framework 4.6
$commitPathMessage$
</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis.Workspaces.Common" version="[$version$]" />
......
......@@ -2,12 +2,13 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.VisualStudio.LanguageServices</id>
<description>
<summary>
.NET Compiler Platform ("Roslyn") support for Visual Studio.
Supported Platforms:
- .NET Framework 4.6
</description>
</summary>
<description>$commitPathMessage$</description>
<dependencies>
<dependency id="Microsoft.CodeAnalysis" version="[$version$]" />
</dependencies>
......
......@@ -5,13 +5,13 @@
<Target Name="Build">
<!-- NuGetPerBuildPreReleaseVersion -->
<Exec Command="$(OutputPath)Exes\csi\csi.exe $(MSBuildThisFileDirectory)BuildNuGets.csx $(OutputPath) $(NuGetPerBuildPreReleaseVersion) $(OutputPath)NuGet\PerBuildPreRelease" Condition="'$(NuGetPerBuildPreReleaseVersion)' != ''" />
<Exec Command="$(OutputPath)Exes\csi\csi.exe $(MSBuildThisFileDirectory)BuildNuGets.csx $(OutputPath) $(NuGetPerBuildPreReleaseVersion) $(OutputPath)NuGet\PerBuildPreRelease &quot;$(GitHeadSha)&quot;" Condition="'$(NuGetPerBuildPreReleaseVersion)' != ''" />
<!-- NuGetPreReleaseVersion -->
<Exec Command="$(OutputPath)Exes\csi\csi.exe $(MSBuildThisFileDirectory)BuildNuGets.csx $(OutputPath) $(NuGetPreReleaseVersion) $(OutputPath)NuGet\PreRelease" Condition="'$(NuGetPreReleaseVersion)' != ''" />
<Exec Command="$(OutputPath)Exes\csi\csi.exe $(MSBuildThisFileDirectory)BuildNuGets.csx $(OutputPath) $(NuGetPreReleaseVersion) $(OutputPath)NuGet\PreRelease &quot;$(GitHeadSha)&quot;" Condition="'$(NuGetPreReleaseVersion)' != ''" />
<!-- NuGetReleaseVersion -->
<Exec Command="$(OutputPath)Exes\csi\csi.exe $(MSBuildThisFileDirectory)BuildNuGets.csx $(OutputPath) $(NuGetReleaseVersion) $(OutputPath)NuGet\Release" Condition="'$(NuGetReleaseVersion)' != ''" />
<Exec Command="$(OutputPath)Exes\csi\csi.exe $(MSBuildThisFileDirectory)BuildNuGets.csx $(OutputPath) $(NuGetReleaseVersion) $(OutputPath)NuGet\Release &quot;$(GitHeadSha)&quot;" Condition="'$(NuGetReleaseVersion)' != ''" />
</Target>
<Target Name="Clean">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册