]> git.immae.eu Git - github/wallabag/wallabag.git/blob - GNUmakefile
Fix PG & Travis drop/create database
[github/wallabag/wallabag.git] / GNUmakefile
1 SHELL=bash
2 TMP_FOLDER=/tmp
3 RELEASE_FOLDER=wllbg-release
4
5 ENV ?= prod
6
7 help: ## Display this help menu
8 @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
9
10 clean: ## Clear the application cache
11 rm -rf var/cache/*
12
13 install: ## Install wallabag with the latest version
14 @./scripts/install.sh $(ENV)
15
16 update: ## Update the wallabag installation to the latest version
17 @./scripts/update.sh $(ENV)
18
19 dev: ## Install the latest dev version
20 @./scripts/dev.sh
21
22 run: ## Run the wallabag built-in server
23 @php bin/console server:run --env=dev
24
25 build: ## Run webpack
26 @npm run build:$(ENV)
27
28 prepare-travis-pg: ## Custom prepare for Travis & Postgres (do not drop/create the database)
29 ifdef DB
30 cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
31 endif
32 php bin/console doctrine:migrations:migrate --no-interaction --env=test
33
34 prepare: clean ## Prepare database for testsuite
35 ifdef DB
36 cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
37 endif
38 -php bin/console doctrine:database:drop --force --env=test
39 php bin/console doctrine:database:create --env=test
40 php bin/console doctrine:migrations:migrate --no-interaction --env=test
41
42 fixtures: ## Load fixtures into database
43 php bin/console doctrine:fixtures:load --no-interaction --env=test
44
45 test: prepare fixtures ## Launch wallabag testsuite
46 bin/simple-phpunit -v
47
48 release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
49 ifndef VERSION
50 $(error VERSION is not set)
51 endif
52 @./scripts/release.sh $(VERSION) $(TMP_FOLDER) $(RELEASE_FOLDER) $(ENV)
53
54 deploy: ## Deploy wallabag
55 @bundle exec cap staging deploy
56
57 .PHONY: help clean prepare install fixtures update build test release deploy run dev
58
59 .DEFAULT_GOAL := install