File tree 8 files changed +27
-7
lines changed
8 files changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ branches:
7
7
- /^release\/.*/
8
8
- /^(.*\/)?ci-.*$/
9
9
build_script :
10
- - ps : .\build.ps1
10
+ - ps : .\build.ps1 -ci
11
11
clone_depth : 1
12
12
test : off
13
13
deploy : off
Original file line number Diff line number Diff line change @@ -25,3 +25,4 @@ global.json
25
25
launchSettings.json
26
26
korebuild-lock.txt
27
27
* .binlog
28
+ .dotnet /
Original file line number Diff line number Diff line change @@ -18,4 +18,4 @@ branches:
18
18
- /^release\/.*/
19
19
- /^(.*\/)?ci-.*$/
20
20
script :
21
- - ./build.sh
21
+ - ./build.sh --ci
Original file line number Diff line number Diff line change 4
4
<#
5
5
. DESCRIPTION
6
6
Builds this repository
7
+ . PARAMETER CI
8
+ Treat build as a CI build
7
9
. PARAMETER SkipTests
8
10
Skip tests
9
11
. PARAMETER DotNetHome
21
23
#>
22
24
[CmdletBinding (PositionalBinding = $false )]
23
25
param (
26
+ [switch ]$CI ,
24
27
[switch ]$SkipTests ,
25
28
[string ]$DotNetHome = $null ,
26
29
[string ]$ToolsSource = ' https://aspnetcore.blob.core.windows.net/buildtools' ,
62
65
$MSBuildArguments += " -p:DotNetRestoreSources=$RestoreSources "
63
66
}
64
67
65
- Set-KoreBuildSettings - ToolsSource $ToolsSource - DotNetHome $DotNetHome - RepoPath $PSScriptRoot - ConfigFile $ConfigFile
68
+ Set-KoreBuildSettings - ToolsSource $ToolsSource - DotNetHome $DotNetHome - RepoPath $PSScriptRoot - ConfigFile $ConfigFile - CI: $CI
66
69
Invoke-KoreBuildCommand " default-build" @MSBuildArguments
67
70
}
68
71
finally {
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ __usage() {
14
14
echo " -v|--verbose Show verbose output."
15
15
echo " -d|--dotnet-home <DIR> The directory where .NET Core tools will be stored. Defaults to '$DOTNET_HOME '."
16
16
echo " -s|--tools-source <URL> The base url where build tools can be downloaded. Defaults to '$tools_source '."
17
+ echo " --ci Apply CI specific settings and environment variables."
17
18
exit 2
18
19
}
19
20
@@ -25,6 +26,7 @@ __usage() {
25
26
config_file=" $DIR /korebuild.json"
26
27
tools_source=' https://aspnetcore.blob.core.windows.net/buildtools'
27
28
verbose=false
29
+ ci=false
28
30
while [[ $# -gt 0 ]]; do
29
31
case $1 in
30
32
-\? |-h|--help)
@@ -43,6 +45,9 @@ while [[ $# -gt 0 ]]; do
43
45
-v|--verbose)
44
46
verbose=true
45
47
;;
48
+ --ci|-[Cc][Ii])
49
+ ci=true
50
+ ;;
46
51
--)
47
52
shift
48
53
break
@@ -54,6 +59,6 @@ while [[ $# -gt 0 ]]; do
54
59
shift
55
60
done
56
61
57
- set_korebuildsettings " $tools_source " " $DOTNET_HOME " " $DIR " " $config_file "
62
+ set_korebuildsettings " $tools_source " " $DOTNET_HOME " " $DIR " " $config_file " " $ci "
58
63
59
64
invoke_korebuild_command " default-build" " $@ "
Original file line number Diff line number Diff line change 23
23
<BundledPackageRestorerContent >
24
24
<![CDATA[
25
25
<Project Sdk="Microsoft.NET.Sdk">
26
+
27
+ <Sdk Name="Microsoft.DotNet.GlobalTools.Sdk" Version="$(Version)" />
28
+
26
29
<PropertyGroup>
27
30
<TargetFramework>netcoreapp2.0</TargetFramework>
28
31
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
29
32
</PropertyGroup>
33
+
30
34
<ItemGroup>
31
35
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(Version)" />
32
- <PackageReference Include="Microsoft.DotNet.GlobalTools.Sdk" Version="$(Version)" />
33
36
</ItemGroup>
37
+
34
38
</Project>
35
39
]]>
36
40
</BundledPackageRestorerContent >
37
41
</PropertyGroup >
38
42
39
43
<WriteLinesToFile File =" $(PublishDir)BundledPackageRestorer.csproj" Lines =" $(BundledPackageRestorerContent)" Overwrite =" true" />
40
- <Copy SourceFiles =" module.props;module.targets" DestinationFolder =" $(PublishDir)" />
44
+ <Copy SourceFiles =" module.props;module.targets;NuGet.config " DestinationFolder =" $(PublishDir)" />
41
45
</Target >
42
46
43
47
</Project >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <configuration >
3
+ <packageSources >
4
+ <clear />
5
+ <add key =" LocalFolder" value =" ./" />
6
+ </packageSources >
7
+ </configuration >
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ while [[ $# -gt 0 ]]; do
186
186
--reinstall|-[Rr]einstall)
187
187
reinstall=true
188
188
;;
189
- --ci)
189
+ --ci|-[Cc][Ii] )
190
190
ci=true
191
191
;;
192
192
--verbose|-Verbose)
You can’t perform that action at this time.
0 commit comments