Skip to content

Commit

Permalink
Merge branch 'master' into huniafatima/cleanup-metrics-work
Browse files Browse the repository at this point in the history
  • Loading branch information
huniafatima-arbi committed Oct 4, 2024
2 parents 8fca787 + 23451b5 commit 7c456c7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
4 changes: 2 additions & 2 deletions docs/service_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ Some common service combinations include:
.. _frontend-app-publisher: https://github.com/openedx/frontend-app-publisher
.. _frontend-app-gradebook: https://github.com/openedx/frontend-app-gradebook
.. _lms: https://github.com/openedx/edx-platform
.. _frontend-app-program-console: https://github.com/openedx/frontend-app-program-console
.. _registrar: https://github.com/openedx/registrar
.. _frontend-app-program-console: https://github.com/edx/frontend-app-program-console
.. _registrar: https://github.com/edx/registrar
.. _cms: https://github.com/openedx/edx-platform
.. _frontend-app-learner-dashboard: https://github.com/openedx/frontend-app-learner-dashboard
.. _frontend-app-learner-record: https://github.com/openedx/frontend-app-learner-record
Expand Down
34 changes: 23 additions & 11 deletions repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ repos=(
"https://github.com/openedx/xqueue.git"
"https://github.com/edx/edx-analytics-dashboard.git"
"https://github.com/openedx/frontend-app-gradebook.git"
"https://github.com/openedx/frontend-app-learner-dashboard"
"https://github.com/openedx/frontend-app-learner-record"
"https://github.com/openedx/frontend-app-learner-dashboard.git"
"https://github.com/openedx/frontend-app-learner-record.git"
"https://github.com/edx/frontend-app-payment.git"
"https://github.com/openedx/frontend-app-publisher.git"
"https://github.com/edx/edx-analytics-dashboard.git"
Expand All @@ -43,8 +43,8 @@ non_release_repos=(
"https://github.com/openedx/frontend-app-course-authoring.git"
"https://github.com/openedx/frontend-app-learning.git"
"https://github.com/openedx/frontend-app-library-authoring.git"
"https://github.com/openedx/registrar.git"
"https://github.com/openedx/frontend-app-program-console.git"
"https://github.com/edx/registrar.git"
"https://github.com/edx/frontend-app-program-console.git"
"https://github.com/openedx/frontend-app-account.git"
"https://github.com/openedx/frontend-app-profile.git"
"https://github.com/openedx/frontend-app-ora-grading.git"
Expand Down Expand Up @@ -73,8 +73,8 @@ non_release_ssh_repos=(
"[email protected]:openedx/frontend-app-course-authoring.git"
"[email protected]:openedx/frontend-app-learning.git"
"[email protected]:openedx/frontend-app-library-authoring.git"
"[email protected]:openedx/registrar.git"
"[email protected]:openedx/frontend-app-program-console.git"
"[email protected]:edx/registrar.git"
"[email protected]:edx/frontend-app-program-console.git"
"[email protected]:openedx/frontend-app-account.git"
"[email protected]:openedx/frontend-app-profile.git"
"[email protected]:openedx/frontend-app-ora-grading.git"
Expand All @@ -87,7 +87,7 @@ else
ssh_repos+=("${non_release_ssh_repos[@]}")
fi

name_pattern=".*/(.*).git"
name_pattern=".*/(.*).git$"

_checkout ()
{
Expand All @@ -97,7 +97,10 @@ _checkout ()
do
# Use Bash's regex match operator to capture the name of the repo.
# Results of the match are saved to an array called $BASH_REMATCH.
[[ $repo =~ $name_pattern ]]
if [[ ! $repo =~ $name_pattern ]]; then
echo "Cannot perform checkout on repo; URL did not match expected pattern: $repo"
exit 1
fi
name="${BASH_REMATCH[1]}"

# If a directory exists and it is nonempty, assume the repo has been cloned.
Expand All @@ -122,7 +125,10 @@ _clone ()
do
# Use Bash's regex match operator to capture the name of the repo.
# Results of the match are saved to an array called $BASH_REMATCH.
[[ $repo =~ $name_pattern ]]
if [[ ! $repo =~ $name_pattern ]]; then
echo "Cannot clone repo; URL did not match expected pattern: $repo"
exit 1
fi
name="${BASH_REMATCH[1]}"

# If a directory exists and it is nonempty, assume the repo has been checked out
Expand Down Expand Up @@ -196,7 +202,10 @@ reset ()

for repo in ${repos[*]}
do
[[ $repo =~ $name_pattern ]]
if [[ ! $repo =~ $name_pattern ]]; then
echo "Cannot reset repo; URL did not match expected pattern: $repo"
exit 1
fi
name="${BASH_REMATCH[1]}"

if [ -d "$name" ]; then
Expand Down Expand Up @@ -227,7 +236,10 @@ status ()
currDir=$(pwd)
for repo in ${repos[*]}
do
[[ $repo =~ $name_pattern ]]
if [[ ! $repo =~ $name_pattern ]]; then
echo "Cannot check repo status; URL did not match expected pattern: $repo"
exit 1
fi
name="${BASH_REMATCH[1]}"

if [ -d "$name" ]; then
Expand Down

0 comments on commit 7c456c7

Please sign in to comment.