Skip to content

Commit ff2aeba

Browse files
authored
Merge pull request moodlehq#4849 from crazyserver/MOBILE-5088
MOBILE-5088 behat: Fix build_behat_plugin call
2 parents a2a454c + a7ba885 commit ff2aeba

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

.github/scripts/update_behat_plugin.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,6 @@ fi
1515

1616
REPO_PATH="/tmp/local_moodleappbehat"
1717

18-
# Clone plugin repository.
19-
print_title "Cloning Behat plugin repository..."
20-
21-
git clone https://$GIT_TOKEN@github.com/$BEHAT_PLUGIN_GITHUB_REPOSITORY.git "${REPO_PATH}" -b $GITHUB_REF_NAME
22-
23-
build_behat_plugin $GITHUB_REF_NAME $BEHAT_PLUGIN_EXCLUDE_FEATURES
24-
25-
# Update the ci branch with the same content as latest but with feature files.
26-
if [[ $GITHUB_REF_NAME == "latest" ]]; then
27-
pushd "${REPO_PATH}"
28-
print_title "Checking out ci branch of Behat plugin repository..."
29-
git checkout ci
30-
popd
31-
32-
build_behat_plugin ci
33-
fi
34-
3518

3619
function build_behat_plugin() {
3720
branchname=$1
@@ -88,3 +71,20 @@ Check out the commits that caused these changes: https://github.com/$GITHUB_REPO
8871

8972
echo "Behat plugin branch ${branchname} updated!"
9073
}
74+
75+
# Clone plugin repository.
76+
print_title "Cloning Behat plugin repository..."
77+
78+
git clone https://$GIT_TOKEN@github.com/$BEHAT_PLUGIN_GITHUB_REPOSITORY.git "${REPO_PATH}" -b $GITHUB_REF_NAME
79+
80+
build_behat_plugin $GITHUB_REF_NAME $BEHAT_PLUGIN_EXCLUDE_FEATURES
81+
82+
# Update the ci branch with the same content as latest but with feature files.
83+
if [[ $GITHUB_REF_NAME == "latest" ]]; then
84+
pushd "${REPO_PATH}"
85+
print_title "Checking out ci branch of Behat plugin repository..."
86+
git checkout ci
87+
popd
88+
89+
build_behat_plugin ci
90+
fi

0 commit comments

Comments
 (0)