Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
491e4b33
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
491e4b33
编写于
10月 05, 2020
作者:
J
Joey Robichaud
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove VSIX publishing support
上级
56e10216
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
51 deletion
+13
-51
eng/config/PublishVsix.MyGet.config
eng/config/PublishVsix.MyGet.config
+0
-12
eng/publish-assets.ps1
eng/publish-assets.ps1
+13
-39
未找到文件。
eng/config/PublishVsix.MyGet.config
已删除
100644 → 0
浏览文件 @
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
>
eng/publish-assets.ps1
浏览文件 @
491e4b33
# 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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录