]> git.immae.eu Git - github/wallabag/wallabag.git/blob - GNUmakefile
Merge pull request #4438 from wallabag/dependabot/composer/scheb/two-factor-bundle...
[github/wallabag/wallabag.git] / GNUmakefile
1 SHELL=bash
2 TMP_FOLDER=/tmp
3 RELEASE_FOLDER=wllbg-release
4
5 # ensure the ENV variable is well defined
6 AVAILABLE_ENV := prod dev test
7 ifneq ($(filter $(ENV),$(AVAILABLE_ENV)),)
8 # all good
9 else
10 # not good, force it to "prod"
11 override ENV = prod
12 endif
13
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}'
16
17 clean: ## Clear the application cache
18 rm -rf var/cache/*
19
20 install: ## Install wallabag with the latest version
21 @./scripts/install.sh $(ENV)
22
23 update: ## Update the wallabag installation to the latest version
24 @./scripts/update.sh $(ENV)
25
26 dev: ENV=dev
27 dev: build ## Install the latest dev version
28 @./scripts/dev.sh
29
30 run: ## Run the wallabag built-in server
31 @php bin/console server:run --env=dev
32
33 build: ## Run webpack
34 @npm install
35 @npm run build:$(ENV)
36
37 prepare: clean ## Prepare database for testsuite
38 ifdef DB
39 cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
40 endif
41 -php bin/console doctrine:database:drop --force --env=test
42 php bin/console doctrine:database:create --env=test
43 php bin/console doctrine:migrations:migrate --no-interaction --env=test
44
45 fixtures: ## Load fixtures into database
46 php bin/console doctrine:fixtures:load --no-interaction --env=test
47
48 test: prepare fixtures ## Launch wallabag testsuite
49 bin/simple-phpunit -v
50
51 release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
52 ifndef VERSION
53 $(error VERSION is not set)
54 endif
55 @./scripts/release.sh $(VERSION) $(TMP_FOLDER) $(RELEASE_FOLDER) $(ENV)
56
57 deploy: ## Deploy wallabag
58 @bundle exec cap staging deploy
59
60 .PHONY: help clean prepare install fixtures update build test release deploy run dev
61
62 .DEFAULT_GOAL := install