File tree Expand file tree Collapse file tree 5 files changed +18
-21
lines changed
arcade/eng/common/core-templates/steps
nuget-client/eng/dotnet-build Expand file tree Collapse file tree 5 files changed +18
-21
lines changed Original file line number Diff line number Diff line change 106
106
107
107
<!-- Common args used for building and testing. -->
108
108
<PropertyGroup >
109
+ <CommonArgs Condition =" '$(DotNetBuildSourceOnly)' != 'true'" >$(CommonArgs) $(FlagParameterPrefix)productBuild</CommonArgs >
110
+
109
111
<!-- TODO: Remove the DisableDevBuildAsDefaultForSourceOnly condition when dev builds are the default for source only.
110
112
https://github.com/dotnet/source-build/issues/4922 -->
111
- <CommonArgs Condition =" '$(ContinuousIntegrationBuild)' == 'true' or ('$(DotNetBuildSourceOnly)' == 'true' and '$(DisableDevBuildAsDefaultForSourceOnly)' == 'true')" >$(FlagParameterPrefix)ci</CommonArgs >
113
+ <CommonArgs Condition =" '$(ContinuousIntegrationBuild)' == 'true' or ('$(DotNetBuildSourceOnly)' == 'true' and '$(DisableDevBuildAsDefaultForSourceOnly)' == 'true')" >$(CommonArgs) $( FlagParameterPrefix)ci</CommonArgs >
112
114
113
115
<!-- Pass down configuration properties -->
114
116
<CommonArgs >$(CommonArgs) $(FlagParameterPrefix)configuration $(Configuration)</CommonArgs >
132
134
<CommonArgs >$(CommonArgs) /p:SourceBuiltAssetManifestsDir=$(RepoAssetManifestsDir)</CommonArgs >
133
135
134
136
<CommonArgs >$(CommonArgs) /p:GitHubRepositoryName=$(RepositoryName)</CommonArgs >
135
- <CommonArgs >$(CommonArgs) /p:DotNetBuildRepo=true</CommonArgs >
136
137
<CommonArgs >$(CommonArgs) /p:DotNetBuildOrchestrator=true</CommonArgs >
137
138
138
139
<!-- Pass the repository URL in globally so that we redirect sourcelink package information to the VMR repo. -->
146
147
</PropertyGroup >
147
148
148
149
<PropertyGroup Condition =" '$(DotNetBuildSourceOnly)' == 'true'" >
149
- <CommonArgs >$(CommonArgs) /p:DotNetBuildSourceOnly=true </CommonArgs >
150
+ <CommonArgs >$(CommonArgs) $(FlagParameterPrefix)sourceBuild </CommonArgs >
150
151
<CommonArgs >$(CommonArgs) /p:PreviouslySourceBuiltNupkgCacheDir="$(PreviouslySourceBuiltPackagesPath)"</CommonArgs >
151
152
<CommonArgs >$(CommonArgs) /p:ReferencePackageNupkgCacheDir="$(ReferencePackagesDir)"</CommonArgs >
152
153
<CommonArgs >$(CommonArgs) /p:TrackPrebuiltUsageReportDir="$(ArtifactsLogRepoDir)"</CommonArgs >
Original file line number Diff line number Diff line change 12
12
<BuildActions Condition =" '$(BuildOS)' == 'windows' and '$(ForceDotNetMSBuildEngine)' != 'false'" >$(BuildActions) $(FlagParameterPrefix)noVisualStudio</BuildActions >
13
13
14
14
<BuildArgs >$(BuildArgs) /p:GenerateResourceUsePreserializedResources=true</BuildArgs >
15
-
16
- <!-- This makes sure that the fsharp scripts understand that the build is executed in product build mode.
17
- Important as it picks a different solution to build based on that.
18
- This flag can get removed when the VMR passes it in globally to all repos. -->
19
- <BuildArgs >$(BuildArgs) $(FlagParameterPrefix)productBuild</BuildArgs >
20
- <!--
21
- dotnet/fsharp has a custom eng/build.sh script that handles its own sourcebuild arg
22
- differently from the standard MSBuild arg set. Including both args is fine, but the
23
- custom sourcebuild arg is the one that's required. This avoids running bootstrapping twice.
24
- -->
25
- <BuildArgs Condition =" '$(DotNetBuildSourceOnly)' == 'true'" >$(BuildArgs) $(FlagParameterPrefix)sourceBuild $(FlagParameterPrefix)tfm $(NetCurrent)</BuildArgs >
15
+ <BuildArgs Condition =" '$(DotNetBuildSourceOnly)' == 'true'" >$(BuildArgs) $(FlagParameterPrefix)tfm $(NetCurrent)</BuildArgs >
26
16
</PropertyGroup >
27
17
28
18
<ItemGroup >
Original file line number Diff line number Diff line change @@ -51,13 +51,12 @@ steps:
51
51
${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \
52
52
--configuration $buildConfig \
53
53
--restore --build --pack -bl \
54
+ --source-build \
54
55
${{ parameters.platform.buildArguments }} \
55
56
$internalRuntimeDownloadArgs \
56
57
$targetRidArgs \
57
58
$baseRidArgs \
58
59
$portableBuildArgs \
59
- /p:DotNetBuildSourceOnly=true \
60
- /p:DotNetBuildRepo=true \
61
60
displayName : Build
62
61
63
62
- template : /eng/common/core-templates/steps/publish-pipeline-artifacts.yml
Original file line number Diff line number Diff line change 5
5
[string ][Alias (' v' )]$verbosity = " minimal" ,
6
6
[switch ]$ci ,
7
7
[switch ]$bl ,
8
+ [switch ][Alias (' pb' )]$productBuild
8
9
[Parameter (ValueFromRemainingArguments = $true )]
9
10
[string []]$AdditionalArgs
10
11
)
@@ -62,14 +63,15 @@ $dotnetArguments += "-v:$verbosity"
62
63
$dotnetArguments += " $PSScriptRoot /dotnet-build.proj"
63
64
# Then remaining arguments.
64
65
$dotnetArguments += " /p:Configuration=$configuration "
65
- $dotnetArguments += " /p:DotNetBuildRepo=true "
66
+ $dotnetArguments += " /p:DotNetBuildRepo=$productBuild "
66
67
$dotnetArguments += " /p:RepoRoot=$repoRoot "
67
68
if ($bl ){
68
69
$dotnetArguments += " /bl:${binLog} "
69
70
}
70
71
if ($ci ) {
71
72
$dotnetArguments += " /p:ContinuousIntegrationBuild=true"
72
73
}
74
+
73
75
# Then any pass-through arguments.
74
76
$dotnetArguments += $AdditionalArgs
75
77
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
8
8
configuration=' Release'
9
9
verbosity=' minimal'
10
10
source_build=false
11
+ product_build=false
11
12
properties=' '
12
13
13
14
# resolve $SOURCE until the file is no longer a symlink
@@ -34,8 +35,13 @@ while [[ $# > 0 ]]; do
34
35
configuration=$2
35
36
shift
36
37
;;
37
- --source-build|-sb)
38
+ --source-build|--sourcebuild|- sb)
38
39
source_build=true
40
+ product_build=true
41
+ shift
42
+ ;;
43
+ --product-build|--productbuild|-pb)
44
+ product_build=true
39
45
shift
40
46
;;
41
47
-* )
@@ -88,9 +94,8 @@ ReadGlobalVersion Microsoft.DotNet.Arcade.Sdk
88
94
export ARCADE_VERSION=$_ReadGlobalVersion
89
95
export NUGET_PACKAGES=${repo_root} artifacts/.packages/
90
96
91
- if [[ " $source_build " == true ]]; then
92
- properties=" $properties /p:DotNetBuildSourceOnly=true"
93
- fi
97
+ properties=" $properties /p:DotNetBuildRepo=$product_build "
98
+ properties=" $properties /p:DotNetBuildSourceOnly=$source_build "
94
99
95
100
properties=" $properties /p:Configuration=$configuration "
96
101
properties=" $properties /p:DotNetBuildRepo=true"
You can’t perform that action at this time.
0 commit comments