@@ -30,9 +30,9 @@ public static AssemblyConfiguration Deserialize(string yaml, bool skipPrivateRep
3030 // If we are skipping private repositories, and we can locate the solution directory. include the local docs-content repository
3131 // this allows us to test new docset features as part of the assembler build
3232 if ( skipPrivateRepositories
33- && config . ReferenceRepositories . TryGetValue ( "docs-builder" , out var docsContentRepository )
34- && Paths . GetSolutionDirectory ( ) is { } solutionDir
35- )
33+ && config . ReferenceRepositories . TryGetValue ( "docs-builder" , out var docsContentRepository )
34+ && Paths . GetSolutionDirectory ( ) is { } solutionDir
35+ )
3636 {
3737 var docsRepositoryPath = Path . Combine ( solutionDir . FullName , "docs" ) ;
3838 config . ReferenceRepositories [ "docs-builder" ] = docsContentRepository with
@@ -86,7 +86,10 @@ private static TRepository RepositoryDefaults<TRepository>(TRepository r, string
8686 } ;
8787 // ensure we always null path if we are running in CI
8888 if ( ! string . IsNullOrWhiteSpace ( Environment . GetEnvironmentVariable ( "CI" ) ) )
89- repository = repository with { Path = null } ;
89+ repository = repository with
90+ {
91+ Path = null
92+ } ;
9093
9194 if ( string . IsNullOrEmpty ( repository . Origin ) )
9295 {
@@ -144,26 +147,42 @@ public ContentSourceMatch Match(string repository, string branchOrTag)
144147 var edge = r . GetBranch ( ContentSource . Edge ) ;
145148 var isVersionBranch = ContentSourceRegex . MatchVersionBranch ( ) . IsMatch ( branchOrTag ) ;
146149 if ( current == branchOrTag )
147- match = match with { Current = ContentSource . Current } ;
150+ match = match with
151+ {
152+ Current = ContentSource . Current
153+ } ;
148154
149155 if ( next == branchOrTag )
150- match = match with { Next = ContentSource . Next } ;
156+ match = match with
157+ {
158+ Next = ContentSource . Next
159+ } ;
151160
152161 if ( edge == branchOrTag )
153- match = match with { Edge = ContentSource . Edge } ;
162+ match = match with
163+ {
164+ Edge = ContentSource . Edge
165+ } ;
154166
155167 if ( isVersionBranch && SemVersion . TryParse ( branchOrTag + ".0" , out var v ) )
156168 {
157169 // if the current branch is a version, only speculatively match if branch is actually a new version
158170 if ( SemVersion . TryParse ( current + ".0" , out var currentVersion ) )
159171 {
160172 if ( v >= currentVersion )
161- match = match with { Speculative = true } ;
173+ match = match with
174+ {
175+ Speculative = true
176+ } ;
162177 }
163178 // assume we are newly onboarding the repository to current/next
164179 else
165- match = match with { Speculative = true } ;
180+ match = match with
181+ {
182+ Speculative = true
183+ } ;
166184 }
185+
167186 return match ;
168187 }
169188
@@ -172,22 +191,37 @@ public ContentSourceMatch Match(string repository, string branchOrTag)
172191 // this is an unknown new elastic repository
173192 var isVersionBranch = ContentSourceRegex . MatchVersionBranch ( ) . IsMatch ( branchOrTag ) ;
174193 if ( isVersionBranch || branchOrTag == "main" || branchOrTag == "master" )
175- return match with { Speculative = true } ;
194+ return match with
195+ {
196+ Speculative = true
197+ } ;
176198 }
177199
178200 if ( Narrative . GetBranch ( ContentSource . Current ) == branchOrTag )
179- match = match with { Current = ContentSource . Current } ;
201+ match = match with
202+ {
203+ Current = ContentSource . Current
204+ } ;
180205
181206 if ( Narrative . GetBranch ( ContentSource . Next ) == branchOrTag )
182- match = match with { Next = ContentSource . Next } ;
207+ match = match with
208+ {
209+ Next = ContentSource . Next
210+ } ;
183211
184212 if ( Narrative . GetBranch ( ContentSource . Edge ) == branchOrTag )
185- match = match with { Edge = ContentSource . Edge } ;
213+ match = match with
214+ {
215+ Edge = ContentSource . Edge
216+ } ;
186217
187218 // if we haven't matched anything yet, and the branch is 'main' or 'master' always build
188- if ( match is { Current : null , Next : null , Edge : null , Speculative : false }
189- && branchOrTag is "main" or "master" )
190- return match with { Speculative = true } ;
219+ if ( match is { Current : null , Next : null , Edge : null , Speculative : false }
220+ && branchOrTag is "main" or "master" )
221+ return match with
222+ {
223+ Speculative = true
224+ } ;
191225
192226 return match ;
193227 }
0 commit comments