This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move 2u repos list out of code. added comments
- Loading branch information
1 parent
90351ea
commit 6751341
Showing
1 changed file
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,8 +75,15 @@ non_release_ssh_repos=( | |
"[email protected]:openedx/frontend-app-profile.git" | ||
"[email protected]:openedx/frontend-app-ora-grading.git" | ||
) | ||
# Space separated list of repos that use 2u specific branch | ||
twou_main_repos="ecommerce yourownrepo" | ||
# Space separated list of repos that use 2u specific branch should be | ||
# set in your environment. example: | ||
# export TWOU_MAIN_REPOS="ecommerce yourownrepo" | ||
# | ||
# If TWOU_MAIN_REPOS is set in the env, then TWOU_CHECKOUT_BRANCH must | ||
# also be set. Here is an example of how to update your bashrc | ||
# file, so that you can get these variables created (note, TWOU_MAIN_REPOS | ||
# likely will grow over time, and not just use ecommerce'): | ||
# $ echo -e "\nexport TWOU_CHECKOUT_BRANCH=\"2u/main\"\nexport TWOU_MAIN_REPOS=\"ecommerce yourownrepo\"" >> ~/.bash_profile | ||
|
||
if [ -n "${OPENEDX_RELEASE}" ]; then | ||
OPENEDX_GIT_BRANCH=open-release/${OPENEDX_RELEASE} | ||
|
@@ -135,14 +142,14 @@ _clone () | |
_checkout_and_update_branch | ||
cd .. | ||
else | ||
if [ -n "${TWOU_CHECKOUT_BRANCH}" ] && echo "${twou_main_repos}" | grep -o "${name}"; then | ||
if [ -n "${TWOU_CHECKOUT_BRANCH}" ] && echo "${TWOU_MAIN_REPOS}" | grep -o "${name}"; then | ||
CLONE_BRANCH="-b ${TWOU_CHECKOUT_BRANCH}" | ||
elif [ -n "${OPENEDX_GIT_BRANCH:-}" ]; then | ||
CLONE_BRANCH="-b ${OPENEDX_GIT_BRANCH}" | ||
else | ||
CLONE_BRANCH="" | ||
fi | ||
echo "CLONE_BRANCH is ${CLONE_BRANCH}" | ||
|
||
if [ "${SHALLOW_CLONE}" == "1" ]; then | ||
git clone ${CLONE_BRANCH} -c core.symlinks=true --depth=1 "${repo}" | ||
else | ||
|
@@ -158,7 +165,7 @@ _checkout_and_update_branch () | |
GIT_SYMBOLIC_REF="$(git symbolic-ref HEAD 2>/dev/null)" | ||
BRANCH_NAME=${GIT_SYMBOLIC_REF##refs/heads/} | ||
|
||
if [ -n "${TWOU_CHECKOUT_BRANCH}" ] && echo "${twou_main_repos}" | grep -o "${name}"; then | ||
if [ -n "${TWOU_CHECKOUT_BRANCH}" ] && echo "${TWOU_MAIN_REPOS}" | grep -o "${name}"; then | ||
CHECKOUT_BRANCH="${TWOU_CHECKOUT_BRANCH}" | ||
elif [ -n "${OPENEDX_GIT_BRANCH}" ]; then | ||
CHECKOUT_BRANCH=${OPENEDX_GIT_BRANCH} | ||
|