File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 44
44
<!-- Flags -->
45
45
<CodeSign Condition =" '$(CodeSign)' == ''" >false</CodeSign >
46
46
<SkipHelp Condition =" '$(SkipHelp)' != 'true'" >false</SkipHelp >
47
+ <TargetBuild Condition =" Exists($(TargetModule))" >true</TargetBuild >
48
+ <TargetBuild Condition =" !Exists($(TargetModule))" >false</TargetBuild >
49
+
50
+
47
51
<!-- Set this true only if you want to test the CodeSign workflow locally -->
48
52
<DelaySign Condition =" '$(DelaySign)' == ''" >false</DelaySign >
49
53
<NetCore Condition =" '$(NetCore)' != 'false'" >true</NetCore >
262
266
<Exec Command =" $(PowerShellCoreCommandPrefix) " . $(RepoTools)/CleanupBuild.ps1 -BuildConfig $(Configuration) -GenerateDocumentationFile $(GenerateDocumentationFile) " " />
263
267
264
268
<Error Condition =" '$(NuGetKey)' == ''" Text =" You must provide the NuGetKey parameter to the build: /p:NuGetKey=YOUR_PUBLISHING_KEY" />
265
- <Exec Command =" $(PowerShellCoreCommandPrefix) " . $(RepoTools)/PublishModules.ps1 -IsNetCore:$$(NetCore) -BuildConfig $(Configuration) -Scope $(Scope) -ApiKey $(NuGetKey) -RepositoryLocation \" $(NuGetPublishingSource)\"" -NugetExe $(NuGetCommand)" />
269
+ <Exec Command =" $(PowerShellCoreCommandPrefix) " . $(RepoTools)/PublishModules.ps1 -TargetBuild $(TargetBuild) - IsNetCore:$$(NetCore) -BuildConfig $(Configuration) -Scope $(Scope) -ApiKey $(NuGetKey) -RepositoryLocation \" $(NuGetPublishingSource)\"" -NugetExe $(NuGetCommand)" />
266
270
</Target >
267
271
268
272
<Target Name =" BuildInstaller" AfterTargets =" Publish" Condition =" ('$(Scope)' == 'All' or '$(Scope)' == 'Latest' or '$(Scope)' == 'Netcore')" >
Original file line number Diff line number Diff line change @@ -56,7 +56,10 @@ param(
56
56
[string ]$RepositoryLocation ,
57
57
58
58
[Parameter (Mandatory = $false , Position = 5 )]
59
- [string ]$NugetExe
59
+ [string ]$NugetExe ,
60
+
61
+ [Parameter (Mandatory = $false , Position = 6 )]
62
+ [string ]$TargetBuild
60
63
)
61
64
62
65
Import-Module " $PSScriptRoot \PublishModules.psm1"
@@ -117,7 +120,7 @@ $env:PSModulePath = "$env:PSModulePath;$tempRepoPath"
117
120
$Errors = $null
118
121
119
122
try {
120
- $modules = Get-AllModules - BuildConfig $BuildConfig - Scope $Scope - PublishLocal:$PublishLocal - IsNetCore:$IsNetCore
123
+ $modules = Get-AllModules - BuildConfig $BuildConfig - Scope $Scope - TargetBuild $TargetBuild - PublishLocal:$PublishLocal - IsNetCore:$IsNetCore
121
124
Add-AllModules - ModulePaths $modules - TempRepo $tempRepoName - TempRepoPath $tempRepoPath - NugetExe $NugetExe
122
125
Publish-AllModules - ModulePaths $modules - ApiKey $apiKey - TempRepoPath $tempRepoPath - RepoLocation $repositoryLocation - NugetExe $NugetExe - PublishLocal:$PublishLocal
123
126
} catch {
Original file line number Diff line number Diff line change @@ -267,6 +267,8 @@ function Get-AllModules {
267
267
[ValidateNotNullOrEmpty ()]
268
268
[String ]$Scope ,
269
269
270
+ [String ]$TargetBuild ,
271
+
270
272
[switch ]$PublishLocal ,
271
273
272
274
[switch ]$IsNetCore
@@ -275,7 +277,7 @@ function Get-AllModules {
275
277
$clientModules = Get-ClientModules - BuildConfig $BuildConfig - Scope $Scope - PublishLocal:$PublishLocal - IsNetCore:$isNetCore
276
278
Write-Host " "
277
279
278
- if ($clientModules.Length -le 2 ) {
280
+ if ($clientModules.Length -le 2 -and $TargetBuild -eq " true " ) {
279
281
return @ {
280
282
ClientModules = $clientModules
281
283
}
You can’t perform that action at this time.
0 commit comments