mirror of
				https://github.com/public-transport/db-vendo-client.git
				synced 2025-11-04 01:56:33 +02:00 
			
		
		
		
	tools/highest-endpoint-version: start with current profile ver
[ci skip]
This commit is contained in:
		
							parent
							
								
									02af67e26c
								
							
						
					
					
						commit
						4950b1e4f9
					
				
					 1 changed files with 13 additions and 1 deletions
				
			
		| 
						 | 
					@ -53,7 +53,19 @@ const checkWithVersion = async (version) => {
 | 
				
			||||||
const silent = argv.silent || argv.s
 | 
					const silent = argv.silent || argv.s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;(async () => {
 | 
					;(async () => {
 | 
				
			||||||
	for (let minor = 16; minor <= 35; minor++) {
 | 
						const parseVer = ver => parseInt(ver.split('.')[1])
 | 
				
			||||||
 | 
						let baseMinor = 16
 | 
				
			||||||
 | 
						if ('string' === typeof profile.ver && profile.ver) {
 | 
				
			||||||
 | 
							baseMinor = parseVer(profile.ver)
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							const ctx = {opt: {}}
 | 
				
			||||||
 | 
							const body = profile.transformReqBody(ctx, {})
 | 
				
			||||||
 | 
							if ('string' === typeof body.ver && body.ver) {
 | 
				
			||||||
 | 
								baseMinor = parseVer(body.ver)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (let minor = baseMinor; minor <= 70; minor++) {
 | 
				
			||||||
		const v = '1.' + minor
 | 
							const v = '1.' + minor
 | 
				
			||||||
		if (await checkWithVersion(v)) {
 | 
							if (await checkWithVersion(v)) {
 | 
				
			||||||
			if (!silent) console.log(v + ' is supported ✔︎')
 | 
								if (!silent) console.log(v + ' is supported ✔︎')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue