Skip to content

Instantly share code, notes, and snippets.

@icarrr
Last active June 19, 2022 23:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icarrr/3679d42d5bb6078306e09a484ed28f5d to your computer and use it in GitHub Desktop.
Save icarrr/3679d42d5bb6078306e09a484ed28f5d to your computer and use it in GitHub Desktop.

Sample makefile for Open edX theming and XBlock

say:
echo 'Hello DevX!'
editable:
sudo chown `whoami` -R `pwd`
reset:
sudo chown edxapp -R `pwd`
reset.cache:
sudo systemctl restart memcached
restart.lms:
sudo /edx/bin/supervisorctl restart lms
restart.cms:
sudo /edx/bin/supervisorctl restart cms
restart.edxapp:
sudo /edx/bin/supervisorctl restart lms cms edxapp_worker:
compile:
THEME_NAME=DevX
sudo -H -u edxapp bash << EOF
echo -n "Now as: " && whoami
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/edx-platform
paver update_assets lms --themes=$THEME_NAME --settings=production
EOF
echo -n "Back to user: " && whoami
restart.lms
build: reset compile
say:
echo 'Hello DevX!'
editable:
sudo chown `whoami` -R `pwd`
reset:
sudo chown edxapp -R `pwd`
restart.lms:
sudo /edx/bin/supervisorctl restart lms
restart.cms:
sudo /edx/bin/supervisorctl restart cms
restart.edxapp:
sudo /edx/bin/supervisorctl restart lms cms edxapp_worker:
install.xblock:
sudo /edx/bin/pip.edxapp install -e `pwd`
restart.edxapp
install: reset install.xblock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment