mirror of
				https://github.com/actions/setup-dotnet.git
				synced 2025-10-31 23:03:45 +00:00 
			
		
		
		
	Handle only latestFeature option
This commit is contained in:
		
							parent
							
								
									33fad1d142
								
							
						
					
					
						commit
						b2cf6c7cd4
					
				| @ -49,7 +49,6 @@ export async function run() { | ||||
| } | ||||
| 
 | ||||
| function getVersionFromGlobalJson(globalJsonPath: string): string { | ||||
|   const optionValues = ['latestFeature', 'latestPatch']; | ||||
|   let version: string = ''; | ||||
|   const globalJson = JSON.parse( | ||||
|     // .trim() is necessary to strip BOM https://github.com/nodejs/node/issues/20649
 | ||||
| @ -57,8 +56,8 @@ function getVersionFromGlobalJson(globalJsonPath: string): string { | ||||
|   ); | ||||
|   if (globalJson.sdk && globalJson.sdk.version) { | ||||
|     version = globalJson.sdk.version; | ||||
|     const rollForward = globalJson.sdk.rollForward ?? ''; | ||||
|     if (optionValues.includes(rollForward)) { | ||||
|     const rollForward = globalJson.sdk.rollForward; | ||||
|     if (rollForward && rollForward === 'latestFeature') { | ||||
|       const [major, minor] = version.split('.'); | ||||
|       version = `${major}.${minor}`; | ||||
|     } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user