You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					26 lines
				
				563 B
			
		
		
			
		
	
	
					26 lines
				
				563 B
			| 
											3 years ago
										 | import exec from './modules/exec.js' | ||
|  | 
 | ||
|  | let metadata_branch_exists = false | ||
|  | 
 | ||
|  | try | ||
|  | { | ||
|  | 	exec('git rev-parse --verify update-metadata') | ||
|  | 	metadata_branch_exists = true | ||
|  | } | ||
|  | catch (error) | ||
|  | { | ||
|  | 	if (error.message.indexOf('fatal: Needed a single revision') === -1) | ||
|  | 	{ | ||
|  | 		throw error | ||
|  | 	} | ||
|  | } | ||
|  | 
 | ||
|  | if (metadata_branch_exists) | ||
|  | { | ||
|  | 	console.log(exec('git checkout master')) | ||
|  | 	console.log(exec('git branch -D update-metadata')) | ||
|  | } | ||
|  | 
 | ||
|  | console.log(exec('git pull')) | ||
|  | console.log(exec('git branch update-metadata origin/master')) | ||
|  | console.log(exec('git checkout update-metadata')) |