Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
495489b9
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,发现更多精彩内容 >>
提交
495489b9
编写于
4月 19, 2017
作者:
J
Jared Parsons
提交者:
Jared Parsons
4月 19, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Bring the scripts up to date with our powershell guidelines
上级
831f2663
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
75 addition
and
71 deletion
+75
-71
src/Tools/GenerateSdkPackages/change-all.ps1
src/Tools/GenerateSdkPackages/change-all.ps1
+22
-22
src/Tools/GenerateSdkPackages/make-all.ps1
src/Tools/GenerateSdkPackages/make-all.ps1
+53
-49
未找到文件。
src/Tools/GenerateSdkPackages/change-all.ps1
浏览文件 @
495489b9
Param
(
[
string
]
$version
=
""
)
[
CmdletBinding
(
PositionalBinding
=
$false
)]
Param
([
string
]
$version
=
""
)
set-strictm
ode
-version
2.0
$Error
ActionPreference
=
"Stop"
Set-StrictM
ode
-version
2.0
$Error
ActionPreference
=
"Stop"
try
{
if
(
$version
-eq
""
)
{
write-h
ost
"Need a -version"
Write-H
ost
"Need a -version"
exit
1
}
$rootPath
=
resolve-path
(
join-p
ath
$PSScriptRoot
"..\..\..\"
)
$repoUtil
=
join-p
ath
$rootPath
"Binaries\Debug\Exes\RepoUtil\RepoUtil.exe"
if
(
-not
(
test-p
ath
$repoUtil
))
{
write-h
ost
"RepoUtil not found
$repoUtil
"
$rootPath
=
Resolve-Path
(
Join-P
ath
$PSScriptRoot
"..\..\..\"
)
$repoUtil
=
Join-P
ath
$rootPath
"Binaries\Debug\Exes\RepoUtil\RepoUtil.exe"
if
(
-not
(
Test-P
ath
$repoUtil
))
{
Write-H
ost
"RepoUtil not found
$repoUtil
"
exit
1
}
$fileList
=
gc
(
join-p
ath
$PSScriptRoot
"files.txt"
)
$fileList
=
Get-Content
(
Join-P
ath
$PSScriptRoot
"files.txt"
)
$shortVersion
=
$version
.
Substring
(
0
,
$version
.
IndexOf
(
'.'
))
$packageVersion
=
"15.0.
$shortVersion
-alpha"
$changeList
=
@()
write-h
ost
"Moving version to
$packageVersion
"
Write-H
ost
"Moving version to
$packageVersion
"
foreach
(
$item
in
$fileList
)
{
$name
=
split-p
ath
-leaf
$item
$name
=
Split-P
ath
-leaf
$item
$simpleName
=
[
IO.Path
]::
GetFileNameWithoutExtension
(
$name
)
$changeList
+=
"
$simpleName
$packageVersion
"
}
$changeFilePath
=
[
IO.Path
]::
GetTempFileName
()
$changeList
-join
[
Environment
]::
NewLine
|
out-f
ile
$changeFilePath
write-h
ost
(
gc
-raw
$changeFilePath
)
$changeList
-join
[
Environment
]::
NewLine
|
Out-F
ile
$changeFilePath
Write-H
ost
(
gc
-raw
$changeFilePath
)
$fullSln
=
join-p
ath
$rootPath
"..\Roslyn.sln"
if
(
test-p
ath
$fullSln
)
{
$fullSln
=
Join-P
ath
$rootPath
"..\Roslyn.sln"
if
(
Test-P
ath
$fullSln
)
{
# Running as a part of the full enlisment. Need to add some extra paramteers
$sourcesPath
=
resolve-path
(
join-p
ath
$rootPath
".."
)
$sourcesPath
=
Resolve-Path
(
Join-P
ath
$rootPath
".."
)
$generatePath
=
$rootPath
$configPath
=
join-p
ath
$rootPath
"build\config\RepoUtilData.json"
$configPath
=
Join-P
ath
$rootPath
"build\config\RepoUtilData.json"
&
$repoUtil
-sourcesPath
$sourcesPath
-generatePath
$generatePath
-config
$configPath
change
-version
$changeFilePath
}
else
{
...
...
@@ -48,7 +47,8 @@ try {
}
}
catch
[
exception
]
{
write-host
$_
.
Exception
exit
-1
catch
{
Write-Host
$_
Write-Host
$_
.
Exception
exit
1
}
src/Tools/GenerateSdkPackages/make-all.ps1
浏览文件 @
495489b9
Param
(
[
string
]
$version
=
"26014.00"
,
[
CmdletBinding
(
PositionalBinding
=
$false
)]
Param
(
[
string
]
$version
=
"26014.00"
,
[
string
]
$branch
=
"d15rel"
,
[
string
]
$outPath
=
$null
,
[
string
]
$fakeSign
=
$null
)
set-strictmode
-version
2.0
$Error
ActionPreference
=
"Stop"
Set-StrictMode
-version
2.0
$Error
ActionPreference
=
"Stop"
function
Create-Directory
([
string
]
$name
)
{
[
IO.Directory
]::
CreateDirectory
(
$name
)
}
# Package a normal DLL into a nuget. Default used for packages that have a simple 1-1
# relationship between DLL and NuGet for only Net46.
function
package-normal
()
{
$baseNuspecPath
=
join-p
ath
$PSScriptRoot
"base.nuspec"
$sourceFilePath
=
join-p
ath
$dropPath
$item
$filePath
=
join-p
ath
$dllPath
$name
if
(
-not
(
test-p
ath
$sourceFilePath
))
{
write-h
ost
"Could not locate
$sourceFilePath
"
$baseNuspecPath
=
Join-P
ath
$PSScriptRoot
"base.nuspec"
$sourceFilePath
=
Join-P
ath
$dropPath
$item
$filePath
=
Join-P
ath
$dllPath
$name
if
(
-not
(
Test-P
ath
$sourceFilePath
))
{
Write-H
ost
"Could not locate
$sourceFilePath
"
continue
;
}
cp
$sourceFilePath
$filePath
Copy-Item
$sourceFilePath
$filePath
&
$fakeSign
-f
$filePath
&
$nuget
pack
$baseNuspecPath
-OutputDirectory
$packagePath
-Properties
name
=
$simpleName
`
;
version
=
$packageVersion
`
;
filePath
=
$filePath
}
...
...
@@ -27,75 +31,75 @@ function package-normal() {
# The debugger DLLs have a more complex structure and it's easier to special case
# copying them over.
function
copy-debugger
()
{
$refRootPath
=
[
IO.Path
]::
GetFullPath
((
join-p
ath
$dropPath
"..\..\Debugger\ReferenceDLL"
))
$debuggerDllPath
=
join-p
ath
$dllPath
"debugger"
$net20Path
=
join-p
ath
$debuggerDllPath
"net20"
$net45Path
=
join-p
ath
$debuggerDllPath
"net45"
$portablePath
=
join-p
ath
$debuggerDllPath
"portable"
$refRootPath
=
[
IO.Path
]::
GetFullPath
((
Join-P
ath
$dropPath
"..\..\Debugger\ReferenceDLL"
))
$debuggerDllPath
=
Join-P
ath
$dllPath
"debugger"
$net20Path
=
Join-P
ath
$debuggerDllPath
"net20"
$net45Path
=
Join-P
ath
$debuggerDllPath
"net45"
$portablePath
=
Join-P
ath
$debuggerDllPath
"portable"
mkdir
$debuggerDllPath
-ErrorAction
SilentlyContinue
|
out-null
mkdir
$net20Path
-ErrorAction
SilentlyContinue
|
out-null
mkdir
$net45Path
-ErrorAction
SilentlyContinue
|
out-null
mkdir
$portablePath
-ErrorAction
SilentlyContinue
|
out-null
Create-Directory
$debuggerDllPath
Create-Directory
$net20Path
Create-Directory
$net45Path
Create-Directory
$portablePath
pushd
$debuggerDllPath
Push-Location
$debuggerDllPath
try
{
$d
=
join-p
ath
$dropPath
"..\..\Debugger"
cp
(
join-p
ath
$d
"RemoteDebugger\Microsoft.VisualStudio.Debugger.Engine.dll"
)
$net20Path
cp
(
join-p
ath
$d
"IDE\Microsoft.VisualStudio.Debugger.Engine.dll"
)
$net45Path
cp
(
join-p
ath
$d
"x-plat\coreclr.windows\mcg\Microsoft.VisualStudio.Debugger.Engine.dll"
)
$portablePath
cp
(
join-p
ath
$dropPath
"Microsoft.VisualStudio.Debugger.Metadata.dll"
)
$net20Path
cp
(
join-p
ath
$dropPath
"Microsoft.VisualStudio.Debugger.Metadata.dll"
)
$portablePath
gci
-re
-in
*.
dll
|
%
{
&
$fakeSign
-f
$_
}
$d
=
Join-P
ath
$dropPath
"..\..\Debugger"
Copy-Item
(
Join-P
ath
$d
"RemoteDebugger\Microsoft.VisualStudio.Debugger.Engine.dll"
)
$net20Path
Copy-Item
(
Join-P
ath
$d
"IDE\Microsoft.VisualStudio.Debugger.Engine.dll"
)
$net45Path
Copy-Item
(
Join-P
ath
$d
"x-plat\coreclr.windows\mcg\Microsoft.VisualStudio.Debugger.Engine.dll"
)
$portablePath
Copy-Item
(
Join-P
ath
$dropPath
"Microsoft.VisualStudio.Debugger.Metadata.dll"
)
$net20Path
Copy-Item
(
Join-P
ath
$dropPath
"Microsoft.VisualStudio.Debugger.Metadata.dll"
)
$portablePath
Get-ChildItem
-re
-in
*.
dll
|
%
{
&
$fakeSign
-f
$_
}
}
finally
{
popd
Pop-Location
}
}
# Used to package debugger nugets
function
package-debugger
()
{
param
(
[
string
]
$kind
)
$debuggerPath
=
join-p
ath
$dllPath
"debugger"
$nuspecPath
=
join-p
ath
$PSScriptRoot
"
$kind
.nuspec"
$debuggerPath
=
Join-P
ath
$dllPath
"debugger"
$nuspecPath
=
Join-P
ath
$PSScriptRoot
"
$kind
.nuspec"
&
$nuget
pack
$nuspecPath
-OutputDirectory
$packagePath
-Properties
version
=
$packageVersion
`
;
debuggerPath
=
$debuggerPath
}
try
{
if
(
$outPath
-eq
""
)
{
write-h
ost
"Need an -outPath value"
Write-H
ost
"Need an -outPath value"
exit
1
}
if
(
$fakeSign
-eq
""
)
{
write-h
ost
"Need a -fakeSign value"
Write-H
ost
"Need a -fakeSign value"
exit
1
}
$list
=
gc
(
join-p
ath
$PSScriptRoot
"files.txt"
)
$list
=
Get-Content
(
Join-P
ath
$PSScriptRoot
"files.txt"
)
$dropPath
=
"\\cpvsbuild\drops\VS\
$branch
\raw\
$version
\binaries.x86ret\bin\i386"
$nuget
=
join-p
ath
$PSScriptRoot
"..\..\..\nuget.exe"
$nuget
=
Join-P
ath
$PSScriptRoot
"..\..\..\nuget.exe"
$shortVersion
=
$version
.
Substring
(
0
,
$version
.
IndexOf
(
'.'
))
$packageVersion
=
"15.0.
$shortVersion
-alpha"
$dllPath
=
join-p
ath
$outPath
"Dlls"
$packagePath
=
join-p
ath
$outPath
"Packages"
$dllPath
=
Join-P
ath
$outPath
"Dlls"
$packagePath
=
Join-P
ath
$outPath
"Packages"
write-h
ost
"Drop path is
$dropPath
"
write-h
ost
"Package version
$packageVersion
"
write-h
ost
"Out path is
$outPath
"
Write-H
ost
"Drop path is
$dropPath
"
Write-H
ost
"Package version
$packageVersion
"
Write-H
ost
"Out path is
$outPath
"
mkdir
$outPath
-ErrorAction
SilentlyContinue
|
out-null
mkdir
$dllPath
-ErrorAction
SilentlyContinue
|
out-null
mkdir
$packagePath
-ErrorAction
SilentlyContinue
|
out-null
pushd
$outPath
Create-Directory
$outPath
Create-Directory
$dllPath
Create-Directory
$packagePath
Push-Location
$outPath
try
{
copy-debugger
foreach
(
$item
in
$list
)
{
$name
=
split-p
ath
-leaf
$item
$name
=
Split-P
ath
-leaf
$item
$simpleName
=
[
IO.Path
]::
GetFileNameWithoutExtension
(
$name
)
write-h
ost
"Packing
$simpleName
"
Write-H
ost
"Packing
$simpleName
"
switch
(
$simpleName
)
{
"Microsoft.VisualStudio.Debugger.Engine"
{
package-debugger
"engine"
}
"Microsoft.VisualStudio.Debugger.Metadata"
{
package-debugger
"metadata"
}
...
...
@@ -104,10 +108,10 @@ try {
}
}
finally
{
popd
Pop-Location
}
}
catch
[
exception
]
{
write-host
$_
.
Exception
exit
-
1
catch
{
Write-Host
$_
exit
1
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录