2018-12-03 18:59:09 +00:00
|
|
|
|
.PHONY: android build
|
2018-09-29 15:08:39 +00:00
|
|
|
|
.DEFAULT_GOAL := help
|
|
|
|
|
|
2018-12-03 18:59:09 +00:00
|
|
|
|
PWD = $$(pwd)
|
2018-04-30 07:01:40 +00:00
|
|
|
|
USERID ?= $$(id -u)
|
2017-12-26 00:16:35 +00:00
|
|
|
|
|
2018-12-03 18:59:09 +00:00
|
|
|
|
build: ## Build all docker images
|
|
|
|
|
cd build/ && make build
|
2018-09-29 15:22:55 +00:00
|
|
|
|
|
2018-12-26 15:00:47 +00:00
|
|
|
|
config.json: upgrade-to-tutor
|
2018-12-03 18:59:09 +00:00
|
|
|
|
@$(MAKE) -s -C build/ build-configurator 1> /dev/null
|
|
|
|
|
@docker run --rm -it \
|
|
|
|
|
--volume="$(PWD):/openedx/config/" \
|
|
|
|
|
-e USERID=$(USERID) -e SILENT=$(SILENT) \
|
2018-09-15 14:19:35 +00:00
|
|
|
|
regis/openedx-configurator:hawthorn
|
2018-09-15 09:55:42 +00:00
|
|
|
|
|
2018-12-25 19:47:41 +00:00
|
|
|
|
substitute: config.json
|
|
|
|
|
@docker run --rm -it \
|
|
|
|
|
--volume="$(PWD)/config.json:/openedx/config/config.json" \
|
|
|
|
|
--volume="$(TEMPLATES):/openedx/templates" \
|
|
|
|
|
--volume="$(OUTPUT):/openedx/output" \
|
|
|
|
|
-e USERID=$(USERID) -e SILENT=$(SILENT) $(CONFIGURE_OPTS) \
|
|
|
|
|
regis/openedx-configurator:hawthorn \
|
|
|
|
|
configurator substitute /openedx/templates/ /openedx/output/
|
|
|
|
|
|
2018-12-26 15:00:47 +00:00
|
|
|
|
singleserver: upgrade-to-tutor ## Configure and run a ready-to-go Open edX platform
|
|
|
|
|
$(MAKE) -C deploy/singleserver all
|
2018-09-29 15:33:43 +00:00
|
|
|
|
|
2018-12-26 15:00:47 +00:00
|
|
|
|
stop: ## Stop all single server services
|
|
|
|
|
$(MAKE) -C deploy/singleserver stop
|
|
|
|
|
|
|
|
|
|
android: upgrade-to-tutor ## Configure and build a development Android app
|
2018-12-03 18:59:09 +00:00
|
|
|
|
cd android/ && make all
|
2018-08-19 12:40:38 +00:00
|
|
|
|
|
2018-12-26 15:00:47 +00:00
|
|
|
|
travis: upgrade-to-tutor
|
2018-12-03 18:59:09 +00:00
|
|
|
|
cd build && make build
|
|
|
|
|
cd deploy/singleserver \
|
|
|
|
|
&& make configure SILENT=1 CONFIGURE_OPTS="-e SETTING_ACTIVATE_NOTES=1 -e SETTING_ACTIVATE_XQUEUE=1" \
|
|
|
|
|
&& make databases \
|
|
|
|
|
&& make assets
|
2018-06-02 01:29:53 +00:00
|
|
|
|
|
2018-12-26 15:00:47 +00:00
|
|
|
|
upgrade-to-tutor: ## Upgrade from earlier versions of tutor
|
2018-12-03 18:59:09 +00:00
|
|
|
|
@(stat config/config.json > /dev/null 2>&1 && (\
|
|
|
|
|
echo "You are running an older version of Tutor. Now migrating to the latest version" \
|
|
|
|
|
&& echo "Moving config/config.json to ./config.json" && mv config/config.json config.json \
|
|
|
|
|
&& echo "Moving config/ to deploy/env/" && mv config/ deploy/env/ \
|
|
|
|
|
&& ((ls openedx/themes/* > /dev/null 2>&1 && echo "Moving openedx/themes/* to build/openedx/themes/" && mv openedx/themes/* build/openedx/themes/) || true) \
|
|
|
|
|
&& echo "Done migrating to tutor. This command will not be run again."\
|
|
|
|
|
)) || true
|
2018-09-29 15:22:55 +00:00
|
|
|
|
|
|
|
|
|
ESCAPE =
|
|
|
|
|
help: ## Print this help
|
|
|
|
|
@grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \
|
|
|
|
|
| sed 's/######* \(.*\)/\n $(ESCAPE)[1;31m\1$(ESCAPE)[0m/g' \
|
|
|
|
|
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'
|