forked from openedx-unsupported/devstack
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set edx.org theme as default for edx-platform and MFEs #67
Merged
+86
−1
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b1cc743
feat: set edx.org theme as default for edx-platform and MFEs in devst…
mfarhan943 b2d1484
feat: Enable per-MFE PARAGON_BRAND_PACKAGE for theme versioning
mfarhan943 d0948d4
chore: update edx/brand versions for MFEs
mfarhan943 e2e7a62
chore: update edx/brand versions for multiple MFEs
mfarhan943 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -707,6 +707,8 @@ services: | |
service: microfrontend | ||
working_dir: '/edx/app/frontend-app-account' | ||
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-account" | ||
environment: | ||
PARAGON_BRAND_PACKAGE: '@edx/[email protected]' | ||
networks: | ||
default: | ||
aliases: | ||
|
@@ -722,6 +724,8 @@ services: | |
service: microfrontend | ||
working_dir: '/edx/app/frontend-app-profile' | ||
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-profile" | ||
environment: | ||
PARAGON_BRAND_PACKAGE: '@edx/brand-edx.org@~2.0.0' | ||
networks: | ||
default: | ||
aliases: | ||
|
@@ -737,6 +741,8 @@ services: | |
service: microfrontend | ||
working_dir: '/edx/app/frontend-app-authn' | ||
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-authn" | ||
environment: | ||
PARAGON_BRAND_PACKAGE: '@edx/[email protected]' | ||
networks: | ||
default: | ||
aliases: | ||
|
@@ -752,6 +758,8 @@ services: | |
service: microfrontend | ||
working_dir: '/edx/app/frontend-app-course-authoring' | ||
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-course-authoring" | ||
environment: | ||
PARAGON_BRAND_PACKAGE: '@edx/[email protected]' | ||
networks: | ||
default: | ||
aliases: | ||
|
@@ -782,6 +790,8 @@ services: | |
service: microfrontend | ||
working_dir: '/edx/app/frontend-app-ora-grading' | ||
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-ora-grading" | ||
environment: | ||
PARAGON_BRAND_PACKAGE: '@edx/[email protected]' | ||
networks: | ||
default: | ||
aliases: | ||
|
@@ -797,6 +807,8 @@ services: | |
service: microfrontend | ||
working_dir: '/edx/app/frontend-app-learner-dashboard' | ||
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-learner-dashboard" | ||
environment: | ||
PARAGON_BRAND_PACKAGE: '@edx/[email protected]' | ||
networks: | ||
default: | ||
aliases: | ||
|
@@ -812,6 +824,8 @@ services: | |
service: microfrontend | ||
working_dir: '/edx/app/frontend-app-learner-record' | ||
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-learner-record" | ||
environment: | ||
PARAGON_BRAND_PACKAGE: '@edx/brand-edx.org@~2.0.0' | ||
networks: | ||
default: | ||
aliases: | ||
|
@@ -827,6 +841,8 @@ services: | |
service: microfrontend | ||
working_dir: '/edx/app/frontend-app-learning' | ||
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-learning" | ||
environment: | ||
PARAGON_BRAND_PACKAGE: '@edx/[email protected]' | ||
networks: | ||
default: | ||
aliases: | ||
|
@@ -842,6 +858,8 @@ services: | |
service: microfrontend | ||
working_dir: '/edx/app/frontend-app-library-authoring' | ||
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-library-authoring" | ||
environment: | ||
PARAGON_BRAND_PACKAGE: '@edx/[email protected]' | ||
networks: | ||
default: | ||
aliases: | ||
|
@@ -858,6 +876,8 @@ services: | |
service: microfrontend | ||
working_dir: '/edx/app/frontend-app-payment' | ||
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-payment" | ||
environment: | ||
PARAGON_BRAND_PACKAGE: '@edx/brand-edx.org@^2.0.6' | ||
networks: | ||
default: | ||
aliases: | ||
|
@@ -873,6 +893,8 @@ services: | |
service: microfrontend | ||
working_dir: '/edx/app/frontend-app-program-console' | ||
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-program-console" | ||
environment: | ||
PARAGON_BRAND_PACKAGE: '@edx/[email protected]' | ||
networks: | ||
default: | ||
aliases: | ||
|
@@ -889,6 +911,8 @@ services: | |
service: microfrontend | ||
working_dir: '/edx/app/frontend-app-publisher' | ||
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-publisher" | ||
environment: | ||
PARAGON_BRAND_PACKAGE: '@edx/[email protected]' | ||
networks: | ||
default: | ||
aliases: | ||
|
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
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
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script sets up the edX theme in LMS and CMS. | ||
|
||
REPO_URL="https://github.com/edx/edx-themes" | ||
THEME_DIR="/edx/src/edx-themes/edx-platform" | ||
DEVSTACK_FILE="../edx-platform/lms/envs/devstack.py" | ||
|
||
# Clone the edx-themes repository into the src directory | ||
cd ../src | ||
if [ ! -d "edx-themes" ]; then | ||
git clone "$REPO_URL" | ||
else | ||
echo "Directory 'edx-themes' already exists. Skipping clone." | ||
fi | ||
cd ../devstack | ||
|
||
# Uncomment relevant lines in the devstack.py file | ||
sed -i '' "s|^# from .common import _make_mako_template_dirs|from .common import _make_mako_template_dirs|" "$DEVSTACK_FILE" | ||
sed -i '' "s|^# ENABLE_COMPREHENSIVE_THEMING = True|ENABLE_COMPREHENSIVE_THEMING = True|" "$DEVSTACK_FILE" | ||
sed -i '' "s|^# COMPREHENSIVE_THEME_DIRS = \[|COMPREHENSIVE_THEME_DIRS = \[|" "$DEVSTACK_FILE" | ||
sed -i '' "s|^# \"/edx/app/edxapp/edx-platform/themes/\"| \"/edx/app/edxapp/edx-platform/themes/\",|" "$DEVSTACK_FILE" | ||
sed -i '' "/COMPREHENSIVE_THEME_DIRS = \[/a\\ | ||
\"$THEME_DIR\", | ||
" "$DEVSTACK_FILE" | ||
sed -i '' "s|^# \]|]|" "$DEVSTACK_FILE" | ||
sed -i '' "s|^# TEMPLATES\[1\]\[\"DIRS\"\] = _make_mako_template_dirs|TEMPLATES[1][\"DIRS\"] = _make_mako_template_dirs|" "$DEVSTACK_FILE" | ||
sed -i '' "s|^# derive_settings(__name__)|derive_settings(__name__)|" "$DEVSTACK_FILE" | ||
|
||
|
||
# Add the theme directory to COMPREHENSIVE_THEME_DIRS if not already present | ||
if ! grep -qF "$THEME_DIR" "$DEVSTACK_FILE"; then | ||
sed -i '' "/COMPREHENSIVE_THEME_DIRS = \[/a\\ | ||
\"$THEME_DIR\", | ||
" "$DEVSTACK_FILE" | ||
fi | ||
|
||
# Set the theme site-wide | ||
SERVICE_NAME="mysql80" | ||
DATABASE="edxapp" | ||
THEME_NAME="edx.org-next" | ||
SITE_ID=1 | ||
|
||
docker compose exec -T "$SERVICE_NAME" mysql -e " | ||
USE $DATABASE; | ||
INSERT INTO theming_sitetheme (theme_dir_name, site_id) VALUES ('$THEME_NAME', $SITE_ID); | ||
" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great; seems to work well locally.