Skip to content

Commit

Permalink
Merge pull request #18099 from dotnet/merges/dev15.1.x-to-master-2017…
Browse files Browse the repository at this point in the history
…0323-070004

Merge dev15.1.x to master
  • Loading branch information
CyrusNajmabadi authored Mar 23, 2017
2 parents 5b7be68 + 7ec7c67 commit 7cf515c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build/Targets/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<MicrosoftBuildTasksCoreVersion>15.1.0-preview-000458-02</MicrosoftBuildTasksCoreVersion>
<MicrosoftBuildTasksCore14Version>14.3.0</MicrosoftBuildTasksCore14Version>
<MicrosoftCodeAnalysisAnalyzersVersion>1.1.0</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisElfieVersion>0.10.6-rc2</MicrosoftCodeAnalysisElfieVersion>
<MicrosoftCodeAnalysisElfieVersion>0.10.6</MicrosoftCodeAnalysisElfieVersion>
<MicrosoftCompositionVersion>1.0.27</MicrosoftCompositionVersion>
<MicrosoftCSharpVersion>4.3.0</MicrosoftCSharpVersion>
<MicrosoftDiagnosticsRuntimeVersion>0.8.31-beta</MicrosoftDiagnosticsRuntimeVersion>
Expand Down
27 changes: 25 additions & 2 deletions src/NuGet/BuildNuGets.csx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ var PreReleaseOnlyPackages = new HashSet<string>
"Microsoft.CodeAnalysis.Remote.ServiceHub",
"Microsoft.CodeAnalysis.Remote.Workspaces",
"Microsoft.CodeAnalysis.Test.Resources.Proprietary",
"Microsoft.VisualStudio.IntegrationTest.Utilities",
"Microsoft.VisualStudio.LanguageServices.Next",
"Microsoft.VisualStudio.LanguageServices.Razor.RemoteClient",
};
Expand Down Expand Up @@ -171,6 +172,26 @@ void ReportError(string message)
Console.ForegroundColor = color;
}

string GetPackageVersion(string packageName)
{
// HACK: since Microsoft.Net.Compilers 2.0.0 was uploaded by accident and later deleted, we must bump the minor.
// We will do this to both the regular Microsoft.Net.Compilers package and also the netcore package to keep them
// in sync.
if (BuildVersion.StartsWith("2.0.") && packageName.StartsWith("Microsoft.Net.Compilers", StringComparison.OrdinalIgnoreCase))
{
string[] buildVersionParts = BuildVersion.Split('-');
string[] buildVersionBaseParts = buildVersionParts[0].Split('.');

buildVersionBaseParts[buildVersionBaseParts.Length - 1] =
(int.Parse(buildVersionBaseParts[buildVersionBaseParts.Length - 1]) + 1).ToString();

buildVersionParts[0] = string.Join(".", buildVersionBaseParts);
return string.Join("-", buildVersionParts);
}

return BuildVersion;
}

int PackFiles(string[] nuspecFiles, string licenseUrl)
{
var commonProperties = new Dictionary<string, string>()
Expand Down Expand Up @@ -212,8 +233,10 @@ int PackFiles(string[] nuspecFiles, string licenseUrl)

if (!IsCoreBuild)
{
string packageArgs = commonArgs.Replace($"-prop version=\"{BuildVersion}\"", $"-prop version=\"{GetPackageVersion(Path.GetFileNameWithoutExtension(file))}\"");

p.StartInfo.FileName = Path.GetFullPath(Path.Combine(SolutionRoot, "nuget.exe"));
p.StartInfo.Arguments = $@"pack {file} {commonArgs}";
p.StartInfo.Arguments = $@"pack {file} {packageArgs}";
}
else
{
Expand Down Expand Up @@ -266,7 +289,7 @@ XElement MakePackageElement(string packageName, string version)

IEnumerable<XElement> MakeRoslynPackageElements(string[] roslynPackageNames)
{
return roslynPackageNames.Select(packageName => MakePackageElement(packageName, BuildVersion));
return roslynPackageNames.Select(packageName => MakePackageElement(packageName, GetPackageVersion(packageName)));
}

void GeneratePublishingConfig(string fileName, IEnumerable<XElement> packages)
Expand Down
6 changes: 3 additions & 3 deletions src/NuGet/NuGet.proj
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
</Target>

<Target Name="Clean">
<MSBuild Projects="@(Project)" Targets="Clean" BuildInParallel="false" />
<RemoveDir Directories="$(OutDir)NuGet" />
</Target>
<Target Name="Rebuild">
<MSBuild Projects="@(Project)" Targets="Rebuild" BuildInParallel="false" />

<Target Name="Rebuild" DependsOnTargets="Clean;Build">
</Target>
</Project>
1 change: 0 additions & 1 deletion src/Workspaces/CoreTest/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"xunit": "2.2.0-beta4-build3444",
"xunit.runner.console": "2.2.0-beta4-build3444",
"xunit.runner.visualstudio": "2.2.0-beta4-build1194",
"Microsoft.CodeAnalysis.Elfie": "0.10.6-rc2",
"Microsoft.Tpl.Dataflow": "4.5.24",
"Microsoft.Build.Runtime": "15.1.0-preview-000458-02",
},
Expand Down

0 comments on commit 7cf515c

Please sign in to comment.