提交 491e4b33 编写于 作者: J Joey Robichaud

Remove VSIX publishing support

上级 56e10216
<?xml version="1.0" encoding="utf-8"?>
<!--
The list of VSIX extensions we produce and upload to myget.org. Currently the script (PostTest.ps1) that
we run after every signed build uploads all shipped extensions in the VSIX folder to myget.org
-->
<extensions>
<extension id="Microsoft.VisualStudio.IntegrationTest.Setup"/>
<extension id="Roslyn.VisualStudio.DiagnosticsWindow"/>
<extension id="Roslyn.Compilers.Extension"/>
<extension id="ExpressionEvaluatorPackage"/>
<extension id="Roslyn.VisualStudio.Setup"/>
</extensions>
# Publishes our build assets to nuget, myget, dotnet/versions, etc ..
#
# The publish operation is best visioned as an optional yet repeatable post build operation. It can be
# run anytime after build or automatically as a post build step. But it is an operation that focuses on
# The publish operation is best visioned as an optional yet repeatable post build operation. It can be
# run anytime after build or automatically as a post build step. But it is an operation that focuses on
# build outputs and hence can't rely on source code from the build being available
#
# Repeatable is important here because we have to assume that publishes can and will fail with some
# degree of regularity.
# Repeatable is important here because we have to assume that publishes can and will fail with some
# degree of regularity.
[CmdletBinding(PositionalBinding=$false)]
Param(
# Standard options
......@@ -14,7 +14,7 @@ Param(
[string]$releaseName = "",
[switch]$test,
# Credentials
# Credentials
[string]$gitHubUserName = "",
[string]$gitHubToken = "",
[string]$gitHubEmail = "",
......@@ -52,7 +52,7 @@ function Publish-Nuget($publishData, [string]$packageDir) {
if (-not (Test-Path $nupkg)) {
throw "$nupkg does not exist"
}
# Lookup the feed name from the packages map using the package name without the version or extension.
$nupkgWithoutVersion = $nupkg -replace '(\.\d){3}-.*.nupkg', ''
if (-not (Get-Member -InputObject $packagesData -Name $nupkgWithoutVersion)) {
......@@ -66,12 +66,12 @@ function Publish-Nuget($publishData, [string]$packageDir) {
Write-Host " Skipping publishing for $nupkg as it is published by arcade"
continue
}
# Use the feed name to get the source to upload the package to.
if (-not (Get-Member -InputObject $feedData -Name $feedName)) {
throw "$feedName has no configured source feed"
}
$uploadUrl = $feedData.$feedName
$apiKey = Get-PublishKey $uploadUrl
......@@ -85,38 +85,18 @@ function Publish-Nuget($publishData, [string]$packageDir) {
}
}
function Publish-Vsix([string]$uploadUrl) {
Write-Host "Publishing VSIX to $uploadUrl"
$apiKey = Get-PublishKey $uploadUrl
$extensions = [xml](Get-Content (Join-Path $EngRoot "config\PublishVsix.MyGet.config"))
foreach ($extension in $extensions.extensions.extension) {
$vsix = Join-Path $VSSetupDir ($extension.id + ".vsix")
if (-not (Test-Path $vsix)) {
throw "VSIX $vsix does not exist"
}
Write-Host " Publishing '$vsix'"
if (-not $test) {
$response = Invoke-WebRequest -Uri $uploadUrl -Headers @{"X-NuGet-ApiKey"=$apiKey} -ContentType 'multipart/form-data' -InFile $vsix -Method Post -UseBasicParsing
if ($response.StatusCode -ne 201) {
throw "Failed to upload VSIX extension: $vsix. Upload failed with Status code: $response.StatusCode"
}
}
}
}
function Publish-Channel([string]$packageDir, [string]$name) {
$publish = GetProjectOutputBinary "RoslynPublish.exe"
$args = "-nugetDir `"$packageDir`" -channel $name -gu $gitHubUserName -gt $gitHubToken -ge $githubEmail"
Write-Host "Publishing $packageDir to channel $name"
if (-not $test) {
if (-not $test) {
Exec-Console $publish $args
}
}
# Do basic verification on the values provided in the publish configuration
function Test-Entry($publishData, [switch]$isBranch) {
if ($isBranch) {
function Test-Entry($publishData, [switch]$isBranch) {
if ($isBranch) {
foreach ($nugetKind in $publishData.nugetKind) {
if ($nugetKind -ne "PerBuildPreRelease" -and $nugetKind -ne "Shipping" -and $nugetKind -ne "NonShipping") {
throw "Branches are only allowed to publish Shipping, NonShipping, or PerBuildPreRelease"
......@@ -125,8 +105,8 @@ function Test-Entry($publishData, [switch]$isBranch) {
}
}
# Publish a given entry: branch or release.
function Publish-Entry($publishData, [switch]$isBranch) {
# Publish a given entry: branch or release.
function Publish-Entry($publishData, [switch]$isBranch) {
Test-Entry $publishData -isBranch:$isBranch
# First publish the NuGet packages to the specified feeds
......@@ -134,12 +114,6 @@ function Publish-Entry($publishData, [switch]$isBranch) {
Publish-NuGet $publishData (Join-Path $PackagesDir $nugetKind)
}
# Next publish the VSIX to the specified feeds
$vsixData = $publishData.vsix
if ($vsixData -ne $null) {
Publish-Vsix $vsixData
}
# Finally get our channels uploaded to versions
foreach ($channel in $publishData.channels) {
foreach ($nugetKind in $publishData.nugetKind) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册