MOBILE-4110 ci: Fix behat plugin diff calculation

main
Noel De Martin 2022-07-07 13:33:27 +02:00
parent 2bbeb60c22
commit e1a6bd688f
2 changed files with 9 additions and 4 deletions

View File

@ -65,10 +65,15 @@ function notify_on_error_exit {
}
function get_behat_plugin_changes_diff {
i=0
previoushash=""
# Grab hashes from app repository
currenthash=`git rev-parse HEAD`
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`
repositoryname=`echo $GITHUB_REPOSITORY | sed "s/\\//\\\\\\\\\\//"`

View File

@ -47,10 +47,10 @@ sed -i s/\$plugin-\>version\ =\ [0-9]\\+\;/\$plugin-\>version\ =\ $newpluginvers
# Apply new changes
print_title "Applying changes to repository..."
cd tmp/local_moodleappbehat
diff=`get_behat_plugin_changes_diff`
cd tmp/local_moodleappbehat
# Set up Github Actions bot user
# 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"