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