File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,18 +80,22 @@ public partial class UpdateClient
8080 /// <summary>
8181 /// Requests the configured update server to increment the major version by one for both stable and canary, and to reset the build number to 0.
8282 /// </summary>
83+ /// <param name="rc">The target release channel.</param>
8384 /// <returns>true if request success; false if non-200 series HTTP status code, null if not configured to support this endpoint.</returns>
8485 /// <remarks>Requires an authorization-bearing client configuration.</remarks>
85- public async Task < bool ? > AdvanceVersionAsync ( )
86+ public async Task < bool ? > AdvanceVersionAsync ( ReleaseChannel ? rc = null )
8687 {
8788 if ( ! _config . CanUseAdminEndpoints )
8889 {
8990 Log ( "Cannot request version advance, as there is no configured admin access token." ) ;
9091 return null ;
9192 }
9293
93- var httpRequest = new HttpRequestMessage ( HttpMethod . Patch ,
94- $ "{ Constants . FullRouteName_Api_Versioning } /{ Constants . RouteName_Api_Versioning_AdvanceVersion } ") ;
94+ var route = $ "{ Constants . FullRouteName_Api_Versioning } /{ Constants . RouteName_Api_Versioning_AdvanceVersion } ";
95+ if ( rc != null )
96+ route += $ "?rc={ rc . Value . QueryStringValue } ";
97+
98+ var httpRequest = new HttpRequestMessage ( HttpMethod . Patch , route ) ;
9599 ApplyAuthorization ( httpRequest ) ;
96100
97101 if ( await _http . SendAsync ( httpRequest ) is { IsSuccessStatusCode : false } resp )
You can’t perform that action at this time.
0 commit comments