@@ -179,9 +179,11 @@ public static bool Execute( BuildContext context, BuildSettings settings )
179179 }
180180
181181 // Check that the build produced the expected artifacts.
182- var allFilesPattern = product . PublicArtifacts . Append ( product . PrivateArtifacts ) ;
182+ var allPublicArtifacts = product . PublicArtifacts . Append ( buildConfigurationInfo . PublicArtifacts ) ;
183+ var allPrivateArtifacts = product . PrivateArtifacts . Append ( buildConfigurationInfo . PrivateArtifacts ) ;
184+ var allArtifacts = allPrivateArtifacts . Append ( allPublicArtifacts ) ;
183185
184- if ( ! allFilesPattern . Verify ( context , privateArtifactsDirectory , buildInfo ) )
186+ if ( ! allArtifacts . Verify ( context , privateArtifactsDirectory , buildInfo ) )
185187 {
186188 return false ;
187189 }
@@ -223,7 +225,7 @@ void CreateEmptyPublicDirectory()
223225 File . WriteAllText ( emptyFile , "This file is intentionally empty." ) ;
224226 }
225227
226- if ( product . PublicArtifacts . IsEmpty )
228+ if ( allPublicArtifacts . IsEmpty )
227229 {
228230 context . Console . WriteMessage ( "Do not prepare public artifacts because there is none." ) ;
229231 CreateEmptyPublicDirectory ( ) ;
@@ -239,7 +241,7 @@ void CreateEmptyPublicDirectory()
239241 context . Console . WriteHeading ( "Copying public artifacts" ) ;
240242 var filePatternMatches = new List < FilePatternMatch > ( ) ;
241243
242- product . PublicArtifacts . TryGetFiles ( privateArtifactsDirectory , buildInfo , filePatternMatches ) ;
244+ allPublicArtifacts . TryGetFiles ( privateArtifactsDirectory , buildInfo , filePatternMatches ) ;
243245 IEnumerable < string > files = filePatternMatches . Select ( m => m . Path ) . ToArray ( ) ;
244246
245247 // Automatically include respective symbol NuGet packages.
0 commit comments