MOBILE-4110 ci: Fix behat plugin diff calculation
parent
2bbeb60c22
commit
e1a6bd688f
|
@ -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/\\//\\\\\\\\\\//"`
|
||||||
|
|
||||||
|
|
|
@ -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…
Reference in New Issue