7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-05-30 12:50:48 +00:00

Simplify env/configure commands

"env" now only generates the environment, and depends only on
config.json, which is run only when necessary. There exists only one
"make configure" command, which force-runs config.json and builds the
env.
This commit is contained in:
Régis Behmo 2018-12-25 20:47:41 +01:00 committed by Régis Behmo
parent fbef486ad4
commit 0a3812cf4f
4 changed files with 17 additions and 39 deletions

View File

@ -7,13 +7,22 @@ USERID ?= $$(id -u)
build: ## Build all docker images
cd build/ && make build
configure:
config.json:
@$(MAKE) -s -C build/ build-configurator 1> /dev/null
@docker run --rm -it \
--volume="$(PWD):/openedx/config/" \
-e USERID=$(USERID) -e SILENT=$(SILENT) \
regis/openedx-configurator:hawthorn
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/
singleserver: ## Configure and run a ready-to-go Open edX platform
cd deploy/ && make all

View File

@ -3,17 +3,8 @@ PWD ?= $$(pwd)
all: environment update android ## Configure and build a development Android app
configure:
@$(MAKE) -C .. configure
env: configure ## Generate the environment
@docker run --rm -it \
--volume="$(PWD)/../:/openedx/config/" \
--volume="$(PWD)/templates:/openedx/templates" \
--volume="$(PWD)/config:/openedx/output" \
-e USERID=$(USERID) \
regis/openedx-configurator:hawthorn \
configurator substitute /openedx/templates/ /openedx/output/
env: ## Generate the environment
@$(MAKE) -s -C .. substitute TEMPLATES=$(PWD)/templates OUTPUT=$(PWD)/config
update: ## Download most recent Android image
docker pull regis/openedx-android:latest

View File

@ -1,22 +1,5 @@
.PHONY: env
PWD = $$(pwd)
configure:
@$(MAKE) -s -C .. configure
env: configure ## Create the platform environment
@docker run --rm -it \
--volume="$(PWD)/../:/openedx/config/" \
--volume="$(PWD)/templates/apps:/openedx/templates" \
--volume="$(PWD)/env:/openedx/output" \
-e USERID=$(USERID) -e SILENT=$(SILENT) $(CONFIGURE_OPTS) \
regis/openedx-configurator:hawthorn \
configurator substitute /openedx/templates/ /openedx/output/
@docker run --rm -it \
--volume="$(PWD)/../:/openedx/config/" \
--volume="$(PWD)/templates/project:/openedx/templates" \
--volume="$(PWD):/openedx/output" \
-e USERID=$(USERID) -e SILENT=$(SILENT) $(CONFIGURE_OPTS) \
regis/openedx-configurator:hawthorn \
configurator substitute /openedx/templates/ /openedx/output/
env: ## Create the platform environment
@$(MAKE) -s -C .. substitute TEMPLATES=$(PWD)/templates OUTPUT=$(PWD)/env

View File

@ -47,17 +47,12 @@ update: ## Download most recent images
##################### Configuration
configure:
@$(MAKE) -s -C .. configure
@$(MAKE) -s -C ../.. --always-make config.json
@$(MAKE) -s env
env:
@$(MAKE) -s -C .. env
@docker run --rm -it \
--volume="$(PWD)/../../:/openedx/config/" \
--volume="$(PWD)/templates/:/openedx/templates" \
--volume="$(PWD):/openedx/output" \
-e USERID=$(USERID) \
regis/openedx-configurator:hawthorn \
configurator substitute /openedx/templates/ /openedx/output/
@$(MAKE) -s -C ../.. substitute TEMPLATES=$(PWD)/templates OUTPUT=$(PWD)
##################### Database