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.
		
		
		
		
		
			
		
			
				
					30 lines
				
				931 B
			
		
		
			
		
	
	
					30 lines
				
				931 B
			| 
								 
											3 years ago
										 
									 | 
							
								import update_metadata from './modules/update-metadata.js'
							 | 
						||
| 
								 | 
							
								import commit from './modules/commit.js'
							 | 
						||
| 
								 | 
							
								import exec from './modules/exec.js'
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								if (update_metadata())
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
									commit()
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									console.log()
							 | 
						||
| 
								 | 
							
									console.log('========================================')
							 | 
						||
| 
								 | 
							
									console.log('=           Pushing changes            =')
							 | 
						||
| 
								 | 
							
									console.log('========================================')
							 | 
						||
| 
								 | 
							
									console.log()
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									// Delete previous `update-metadata` remote branch
							 | 
						||
| 
								 | 
							
									// (if it already exists)
							 | 
						||
| 
								 | 
							
									if (exec('git ls-remote --heads origin update-metadata'))
							 | 
						||
| 
								 | 
							
									{
							 | 
						||
| 
								 | 
							
										console.log(exec('git push origin update-metadata --delete'))
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									// Push the local `update-metadata` branch to GitHub
							 | 
						||
| 
								 | 
							
									console.log(exec('git push origin update-metadata'))
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									console.log()
							 | 
						||
| 
								 | 
							
									console.log('==========================================')
							 | 
						||
| 
								 | 
							
									console.log('= Pushed. Create Pull Request on GitHub. =')
							 | 
						||
| 
								 | 
							
									console.log('==========================================')
							 | 
						||
| 
								 | 
							
									console.log()
							 | 
						||
| 
								 | 
							
								}
							 |