mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-15 15:20:44 +00:00
c903ab2b12
The project gets a new name and some proper documentation. Build/Deploy are now properly separated.
42 lines
1.4 KiB
Makefile
42 lines
1.4 KiB
Makefile
PWD ?= $$(pwd)
|
||
.DEFAULT_GOAL := help
|
||
|
||
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/
|
||
|
||
update: ## Download most recent Android image
|
||
docker pull regis/openedx-android:latest
|
||
|
||
android: ## Build the Android app, for development
|
||
docker run --rm -it \
|
||
--volume=$(PWD)/config/:/openedx/config/ \
|
||
--volume=$(PWD)/data/:/openedx/data \
|
||
regis/openedx-android:latest
|
||
@echo "Your development APK file is ready in $(PWD)/data/"
|
||
|
||
android-release: ## Build the final Android app (beta)
|
||
# Note that this requires that you edit ./config/android/gradle.properties
|
||
docker run --rm -it \
|
||
--volume=$(PWD)/config/:/openedx/config/ \
|
||
--volume=$(PWD)/data/:/openedx/data \
|
||
regis/openedx-android:latest \
|
||
./gradlew assembleProdRelease
|
||
@echo "Your production APK file is ready in $(PWD)/data/"
|
||
|
||
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}'
|