提交 9d586ea1 编写于 作者: J Jared Parsons 提交者: GitHub

Merge pull request #14429 from jaredpar/fix-feed

Move to the new roslyn NuGet feed
......@@ -9,8 +9,12 @@
<RoslynAssemblyVersionBase Condition="'$(RoslynAssemblyVersion)' == ''">2.0.0</RoslynAssemblyVersionBase>
<!-- This is the file version of Roslyn, as placed in the PE header. It should be revved during point releases, and is also what provides the basis for our NuGet package versioning. -->
<RoslynFileVersionBase Condition="'$(RoslynFileVersionBase)' == ''">2.0.0</RoslynFileVersionBase>
<!-- The release moniker for our packages. Developers should use "dev" and official builds pick the branch
moniker listed below -->
<RoslynNuGetMoniker Condition="'$(RoslynNuGetMoniker)' == ''">dev</RoslynNuGetMoniker>
<RoslynNuGetMoniker Condition="'$(OfficialBuild)' == 'true'">rc</RoslynNuGetMoniker>
<!-- This is the base of the NuGet versioning for prerelease packages -->
<NuGetPreReleaseVersion>$(RoslynFileVersionBase)-beta6</NuGetPreReleaseVersion>
<NuGetPreReleaseVersion>$(RoslynFileVersionBase)-$(RoslynNuGetMoniker)</NuGetPreReleaseVersion>
<!-- Currently we version IW the same as Roslyn. -->
<MicrosoftVisualStudioInteractiveWindowVersion>$(RoslynAssemblyVersionBase)</MicrosoftVisualStudioInteractiveWindowVersion>
</PropertyGroup>
......
......@@ -6,7 +6,8 @@
<ProjectDir>$(MSBuildThisFileDirectory)..\..\..\</ProjectDir>
<BranchName Condition="'$(BranchName)' == ''">$(BUILD_SOURCEBRANCH)</BranchName>
<BinariesPath>$(ProjectDir)Binaries\$(Configuration)</BinariesPath>
<RoslynMyGetApiKey Condition="'$(RoslynMyGetApiKey)' == ''">"no key"</RoslynMyGetApiKey>
<RoslynNuGetApiKey Condition="'$(RoslynNuGetApiKey)' == ''">"no key"</RoslynNuGetApiKey>
<PublishAssetsArgs Condition="'$(SkipPublish)' == 'true'">-test</PublishAssetsArgs>
</PropertyGroup>
<!-- Non-official builds / local testing have different defaults -->
......@@ -38,7 +39,7 @@
<Exec Command="powershell -noprofile -executionPolicy ByPass -file $(MSBuildThisFileDirectory)stop-compiler-server.ps1" />
<Exec Command="powershell -noprofile -executionPolicy ByPass -file $(MSBuildThisFileDirectory)publish-assets.ps1 -binariesPath &quot;$(BinariesPath)&quot; -branchName $(BranchName) -apiKey $(RoslynMyGetApiKey) $(PublishAssetsArgs)" />
<Exec Command="powershell -noprofile -executionPolicy ByPass -file $(MSBuildThisFileDirectory)publish-assets.ps1 -binariesPath &quot;$(BinariesPath)&quot; -branchName $(BranchName) -apiKey $(RoslynNuGetApiKey) $(PublishAssetsArgs)" />
<Exec Command="powershell -noprofile -executionPolicy ByPass -file $(MSBuildThisFileDirectory)copy-insertion-items.ps1 -binariesPath &quot;$(BinariesPath)&quot; $(CopyInsertionFileArgs)" />
</Target>
......
......@@ -32,6 +32,25 @@ try
{
Write-Host "Starting PostTest script..."
# We need to remove 'refs/heads/' from the beginning of the string
$branchName = $branchName -Replace "^refs/heads/"
# We also need to replace all instances of '/' with '_'
$branchName = $branchName.Replace("/", "_")
switch ($branchName)
{
"dev15-rc" { }
default
{
if (-not $test)
{
Write-Host "Branch $branchName is not supported for publishing"
exit 1
}
}
}
# MAIN BODY
Stop-Process -Name "vbcscompiler" -Force -ErrorAction SilentlyContinue
......@@ -65,23 +84,13 @@ try
$exitCode = 5
}
# We need to remove 'refs/heads/' from the beginning of the string
$branchName = $branchName -Replace "^refs/heads/"
# We also need to replace all instances of '/' with '_'
$branchName = $branchName.Replace("/", "_")
# MyGet feeds are limited to 40 characters in length
$feedName = ("roslyn-{0}-nightly" -f $branchName)
$feedName = $feedName.Substring(0, [math]::Min($feedName.Length, 40)).ToLower()
Write-Host "Uploading NuGet packages..."
$nugetPath = Join-Path $binariesPath "NuGet\PerBuildPreRelease"
[xml]$packages = Get-Content "$nugetPath\myget_org-packages.config"
$sourceUrl = ("https://dotnet.myget.org/F/{0}/api/v2/package" -f $feedName)
$sourceUrl = "https://dotnet.myget.org/F/roslyn/api/v2/package"
pushd $nugetPath
foreach ($package in $packages.packages.package)
......@@ -115,7 +124,7 @@ try
foreach ($extension in $extensions.extensions.extension)
{
$vsix = $extension.id + ".vsix"
$requestUrl = ("https://dotnet.myget.org/F/{0}/vsix/upload" -f $feedName)
$requestUrl = "https://dotnet.myget.org/F/roslyn/vsix/upload"
Write-Host " Uploading '$vsix' to '$requestUrl'"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册