6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-16 10:05:18 +00:00
tutor/android/Makefile
Régis Behmo 0a3812cf4f 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.
2018-12-26 19:27:08 +01:00

33 lines
1.2 KiB
Makefile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

PWD ?= $$(pwd)
.DEFAULT_GOAL := help
all: environment update android ## Configure and build a development Android app
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
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}'