diff options
Diffstat (limited to 'Makefile')
-rwxr-xr-x | Makefile | 25 |
1 files changed, 16 insertions, 9 deletions
@@ -1,15 +1,13 @@ | |||
1 | TMP_FOLDER=/tmp | 1 | TMP_FOLDER=/tmp |
2 | RELEASE_FOLDER=wllbg-release | 2 | RELEASE_FOLDER=wllbg-release |
3 | 3 | ||
4 | ifndef ENV | 4 | ENV ?= prod |
5 | ENV=prod | ||
6 | endif | ||
7 | 5 | ||
8 | help: ## Display this help menu | 6 | help: ## Display this help menu |
9 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | 7 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
10 | 8 | ||
11 | clean: ## Clear the application cache | 9 | clean: ## Clear the application cache |
12 | @rm -rf var/cache/* | 10 | rm -rf var/cache/* |
13 | 11 | ||
14 | install: ## Install wallabag with the latest version | 12 | install: ## Install wallabag with the latest version |
15 | @sh scripts/install.sh $(ENV) | 13 | @sh scripts/install.sh $(ENV) |
@@ -26,8 +24,19 @@ run: ## Run the wallabag built-in server | |||
26 | build: ## Run webpack | 24 | build: ## Run webpack |
27 | @npm run build:$(ENV) | 25 | @npm run build:$(ENV) |
28 | 26 | ||
29 | test: ## Launch wallabag testsuite | 27 | prepare: clean ## Prepare database for testsuite |
30 | @ant prepare && bin/simple-phpunit -v | 28 | ifdef DB |
29 | cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml | ||
30 | endif | ||
31 | -php bin/console doctrine:database:drop --force --env=test | ||
32 | php bin/console doctrine:database:create --env=test | ||
33 | php bin/console doctrine:migrations:migrate --no-interaction --env=test | ||
34 | |||
35 | fixtures: ## Load fixtures into database | ||
36 | php bin/console doctrine:fixtures:load --no-interaction --env=test | ||
37 | |||
38 | test: prepare fixtures ## Launch wallabag testsuite | ||
39 | bin/simple-phpunit -v | ||
31 | 40 | ||
32 | release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`). | 41 | release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`). |
33 | ifndef VERSION | 42 | ifndef VERSION |
@@ -35,11 +44,9 @@ ifndef VERSION | |||
35 | endif | 44 | endif |
36 | @sh scripts/release.sh $(VERSION) $(TMP_FOLDER) $(RELEASE_FOLDER) $(ENV) | 45 | @sh scripts/release.sh $(VERSION) $(TMP_FOLDER) $(RELEASE_FOLDER) $(ENV) |
37 | 46 | ||
38 | travis: ## Make some stuff for Travis-CI | ||
39 | |||
40 | deploy: ## Deploy wallabag | 47 | deploy: ## Deploy wallabag |
41 | @bundle exec cap staging deploy | 48 | @bundle exec cap staging deploy |
42 | 49 | ||
43 | .PHONY: help clean install update build test release travis deploy run dev | 50 | .PHONY: help clean prepare install fixtures update build test release deploy run dev |
44 | 51 | ||
45 | .DEFAULT_GOAL := install | 52 | .DEFAULT_GOAL := install |