Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
A
aspnetcore
管理
动态
成员
标记
计划
议题
议题看板
里程碑
Wiki
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
构建
流水线
作业
流水线计划
产物
部署
发布
Package registry
Container registry
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
模型实验
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
dotnet
aspnetcore
提交
051f13f1
提交
051f13f1
编辑于
7 years ago
作者:
Justin Kotalik
提交者:
GitHub
7 years ago
浏览文件
操作
下载
补丁
差异文件
Add AppVeyor. (#188)
上级
746f578c
No related branches found
No related tags found
无相关合并请求
变更
4
隐藏空白变更内容
行内
左右并排
显示
4 个更改的文件
.appveyor.yml
+18
-0
18 个添加, 0 个删除
.appveyor.yml
build.cmd
+1
-1
1 个添加, 1 个删除
build.cmd
run.cmd
+2
-0
2 个添加, 0 个删除
run.cmd
run.ps1
+36
-22
36 个添加, 22 个删除
run.ps1
有
57 个添加
和
23 个删除
.appveyor.yml
0 → 100644
+
18
−
0
浏览文件 @
051f13f1
init
:
-
git config --global core.autocrlf
true
branches
:
only
:
-
master
-
release
-
dev
-
/^(.*\/)?ci-.*$/
build_script
:
-
ps
:
.\run.ps1 default-build
clone_depth
:
1
environment
:
global
:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE
:
true
DOTNET_CLI_TELEMETRY_OPTOUT
:
1
test
:
off
deploy
:
off
os
:
Visual Studio 2017
\ No newline at end of file
此差异已折叠。
点击以展开。
build.cmd
+
1
−
1
浏览文件 @
051f13f1
@ECHO
OFF
PowerShell
-NoProfile -NoLogo -ExecutionPolicy
unrestricted
-Command
"[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '
%~dp0
build
.ps1'
%
*; exit $LASTEXITCODE"
PowerShell
-NoProfile -NoLogo -ExecutionPolicy
unrestricted
-Command
"[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '
%~dp0
run.ps1' default-
build
%
*; exit $LASTEXITCODE"
\ No newline at end of file
此差异已折叠。
点击以展开。
run.cmd
0 → 100644
+
2
−
0
浏览文件 @
051f13f1
@ECHO
OFF
PowerShell
-NoProfile -NoLogo -ExecutionPolicy
unrestricted
-Command
"[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '
%~dp0
run.ps1'
%
*; exit $LASTEXITCODE"
\ No newline at end of file
此差异已折叠。
点击以展开。
build
.ps1
→
run
.ps1
+
36
−
22
浏览文件 @
051f13f1
...
...
@@ -3,10 +3,13 @@
<#
.SYNOPSIS
Build this repository
Executes KoreBuild commands.
.DESCRIPTION
Downloads korebuild if required. Then builds the repository.
Downloads korebuild if required. Then executes the KoreBuild command. To see available commands, execute with `-Command help`.
.PARAMETER
Command
The KoreBuild command to run.
.PARAMETER
Path
The folder to build. Defaults to the folder containing this script.
...
...
@@ -24,31 +27,32 @@ The base url where build tools can be downloaded. Overrides the value from the c
Updates KoreBuild to the latest version even if a lock file is present.
.PARAMETER
ConfigFile
The path to the configuration file that stores values. Defaults to
version.xml
.
The path to the configuration file that stores values. Defaults to
korebuild.json
.
.PARAMETER
MSBuildArg
s
Arguments to be passed to
MSBuil
d
.PARAMETER
Argument
s
Arguments to be passed to
the comman
d
.NOTES
This function will create a file $PSScriptRoot/korebuild-lock.txt. This lock file can be committed to source, but does not have to be.
When the lockfile is not present, KoreBuild will create one using latest available version from $Channel.
The $ConfigFile is expected to be an XML file. It is optional, and the configuration values in it are optional as well.
The $ConfigFile is expected to be an JSON file. It is optional, and the configuration values in it are optional as well. Any options set
in the file are overridden by command line parameters.
.EXAMPLE
Example config file:
```xml
<!-- version.xml -->
<Project>
<PropertyGroup>
<KoreBuildChannel>dev</KoreBuildChannel>
<KoreBuildToolsSource>https://aspnetcore.blob.core.windows.net/buildtools</KoreBuildToolsSource>
</PropertyGroup>
</Project>
```json
{
"$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json",
"channel": "dev",
"toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools"
}
```
#>
[
CmdletBinding
(
PositionalBinding
=
$false
)]
param
(
[
Parameter
(
Mandatory
=
$true
,
Position
=
0
)]
[
string
]
$Command
,
[
string
]
$Path
=
$PSScriptRoot
,
[
Alias
(
'c'
)]
[
string
]
$Channel
,
...
...
@@ -58,9 +62,9 @@ param(
[
string
]
$ToolsSource
,
[
Alias
(
'u'
)]
[
switch
]
$Update
,
[
string
]
$ConfigFile
=
(
Join-Path
$PSScriptRoot
'version.xml'
)
,
[
string
]
$ConfigFile
,
[
Parameter
(
ValueFromRemainingArguments
=
$true
)]
[
string
[]]
$
MSBuildArg
s
[
string
[]]
$
Argument
s
)
Set-StrictMode
-Version
2
...
...
@@ -147,10 +151,20 @@ function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) {
# Load configuration or set defaults
$Path
=
Resolve-Path
$Path
if
(
!
$ConfigFile
)
{
$ConfigFile
=
Join-Path
$Path
'korebuild.json'
}
if
(
Test-Path
$ConfigFile
)
{
[
xml
]
$config
=
Get-Content
$ConfigFile
if
(
!
(
$Channel
))
{
[
string
]
$Channel
=
Select-Xml
-Xml
$config
-XPath
'/Project/PropertyGroup/KoreBuildChannel'
}
if
(
!
(
$ToolsSource
))
{
[
string
]
$ToolsSource
=
Select-Xml
-Xml
$config
-XPath
'/Project/PropertyGroup/KoreBuildToolsSource'
}
try
{
$config
=
Get-Content
-Raw
-Encoding
UTF8
-Path
$ConfigFile
|
ConvertFrom-Json
if
(
$config
)
{
if
(
!
(
$Channel
)
-and
(
Get-Member
-Name
'channel'
-InputObject
$config
))
{
[
string
]
$Channel
=
$config
.
channel
}
if
(
!
(
$ToolsSource
)
-and
(
Get-Member
-Name
'toolsSource'
-InputObject
$config
))
{
[
string
]
$ToolsSource
=
$config
.
toolsSource
}
}
}
catch
{
Write-Warning
"
$ConfigFile
could not be read. Its settings will be ignored."
Write-Warning
$Error
[
0
]
}
}
if
(
!
$DotNetHome
)
{
...
...
@@ -169,9 +183,9 @@ $korebuildPath = Get-KoreBuild
Import-Module
-Force
-Scope
Local
(
Join-Path
$korebuildPath
'KoreBuild.psd1'
)
try
{
Install-Tools
$ToolsSource
$DotNetHom
e
Invoke-
Reposit
or
y
Build
$Path
@
MSBuildArg
s
Set-KoreBuildSettings
-ToolsSource
$ToolsSource
-DotNetHome
$DotNetHome
-RepoPath
$Path
-ConfigFile
$ConfigFil
e
Invoke-
K
or
e
Build
Command
$Command
@
Argument
s
}
finally
{
Remove-Module
'KoreBuild'
-ErrorAction
Ignore
}
}
\ No newline at end of file
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录