MOBILE-4110 ci: Fix behat plugin diff calculation
This commit is contained in:
		
							parent
							
								
									2bbeb60c22
								
							
						
					
					
						commit
						e1a6bd688f
					
				
							
								
								
									
										9
									
								
								.github/scripts/functions.sh
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								.github/scripts/functions.sh
									
									
									
									
										vendored
									
									
								
							| @ -65,10 +65,15 @@ function notify_on_error_exit { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function get_behat_plugin_changes_diff { | function get_behat_plugin_changes_diff { | ||||||
|     i=0 |     # Grab hashes from app repository | ||||||
|     previoushash="" |  | ||||||
|     currenthash=`git rev-parse HEAD` |     currenthash=`git rev-parse HEAD` | ||||||
|     initialhash=`git rev-list HEAD | tail -n 1` |     initialhash=`git rev-list HEAD | tail -n 1` | ||||||
|  | 
 | ||||||
|  |     # Move into plugin repository to find previous hash | ||||||
|  |     cd tmp/local_moodleappbehat | ||||||
|  | 
 | ||||||
|  |     i=0 | ||||||
|  |     previoushash="" | ||||||
|     totalcommits=`git log --oneline | wc -l` |     totalcommits=`git log --oneline | wc -l` | ||||||
|     repositoryname=`echo $GITHUB_REPOSITORY | sed "s/\\//\\\\\\\\\\//"` |     repositoryname=`echo $GITHUB_REPOSITORY | sed "s/\\//\\\\\\\\\\//"` | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								.github/scripts/update_behat_plugin.sh
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/scripts/update_behat_plugin.sh
									
									
									
									
										vendored
									
									
								
							| @ -47,10 +47,10 @@ sed -i s/\$plugin-\>version\ =\ [0-9]\\+\;/\$plugin-\>version\ =\ $newpluginvers | |||||||
| # Apply new changes | # Apply new changes | ||||||
| print_title "Applying changes to repository..." | print_title "Applying changes to repository..." | ||||||
| 
 | 
 | ||||||
| cd tmp/local_moodleappbehat |  | ||||||
| 
 |  | ||||||
| diff=`get_behat_plugin_changes_diff` | diff=`get_behat_plugin_changes_diff` | ||||||
| 
 | 
 | ||||||
|  | cd tmp/local_moodleappbehat | ||||||
|  | 
 | ||||||
| # Set up Github Actions bot user | # Set up Github Actions bot user | ||||||
| # See https://github.community/t/github-actions-bot-email-address/17204/6 | # See https://github.community/t/github-actions-bot-email-address/17204/6 | ||||||
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user