3 RELEASE_FOLDER=wllbg-release
5 # ensure the ENV variable is well defined
6 ifeq ($(origin ENV), prod)
7 # all good ("prod" is a valid env)
8 else ifeq ($(origin ENV), dev)
9 # all good ("dev" is a valid env)
10 else ifeq ($(origin ENV), test)
11 # all good ("test" is a valid env)
13 # not good, force it to "prod"
17 help: ## Display this help menu
18 @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
20 clean: ## Clear the application cache
23 install: customcss ## Install wallabag with the latest version
24 @./scripts/install.sh $(ENV)
26 update: ## Update the wallabag installation to the latest version
27 @./scripts/update.sh $(ENV)
30 dev: build customcss ## Install the latest dev version
33 run: ## Run the wallabag built-in server
34 @php bin/console server:run --env=dev
43 prepare: clean ## Prepare database for testsuite
45 cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
47 -php bin/console doctrine:database:drop --force --env=test
48 php bin/console doctrine:database:create --env=test
49 php bin/console doctrine:migrations:migrate --no-interaction --env=test
51 fixtures: ## Load fixtures into database
52 php bin/console doctrine:fixtures:load --no-interaction --env=test
54 test: prepare fixtures ## Launch wallabag testsuite
57 release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
59 $(error VERSION is not set)
61 @./scripts/release.sh $(VERSION) $(TMP_FOLDER) $(RELEASE_FOLDER) $(ENV)
63 deploy: ## Deploy wallabag
64 @bundle exec cap staging deploy
66 .PHONY: help clean prepare install fixtures update build test release deploy run dev
68 .DEFAULT_GOAL := install