aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2017-11-01 13:22:38 +0100
committerKevin Decherf <kevin@kdecherf.com>2017-11-19 12:33:21 +0100
commit8bde7de1ee4b6944e3f3d3024ed619ac5980be27 (patch)
tree18de38922cb46d36ba245a1fc006c28449571edc /Makefile
parentc20327fc723863ca985ac36a4eacec1699d57a31 (diff)
downloadwallabag-8bde7de1ee4b6944e3f3d3024ed619ac5980be27.tar.gz
wallabag-8bde7de1ee4b6944e3f3d3024ed619ac5980be27.tar.zst
wallabag-8bde7de1ee4b6944e3f3d3024ed619ac5980be27.zip
Replace ant with Makefile
Fixes #1735 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile36
1 files changed, 27 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index ffbe102a..9e44edc6 100755
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,13 @@
1TMP_FOLDER=/tmp 1TMP_FOLDER=/tmp
2RELEASE_FOLDER=wllbg-release 2RELEASE_FOLDER=wllbg-release
3 3
4ifndef ENV 4ENV ?= prod
5 ENV=prod
6endif
7 5
8help: ## Display this help menu 6help: ## 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
11clean: ## Clear the application cache 9clean: ## Clear the application cache
12 @rm -rf var/cache/* 10 rm -rf var/cache/*
13 11
14install: ## Install wallabag with the latest version 12install: ## Install wallabag with the latest version
15 @sh scripts/install.sh $(ENV) 13 @sh scripts/install.sh $(ENV)
@@ -26,8 +24,30 @@ run: ## Run the wallabag built-in server
26build: ## Run webpack 24build: ## Run webpack
27 @npm run build:$(ENV) 25 @npm run build:$(ENV)
28 26
29test: ## Launch wallabag testsuite 27prepare: clean ## Prepare database for testsuite
30 @ant prepare && bin/simple-phpunit -v 28ifdef DB
29 cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
30endif
31 -php bin/console doctrine:database:drop --force --env=test
32 php bin/console doctrine:database:create --env=test
33ifndef DB ## make test does not define DB
34 php bin/console doctrine:schema:create --env=test
35endif
36ifeq ($(DB), sqlite)
37 php bin/console doctrine:schema:create --env=test
38endif
39ifeq ($(DB), mysql)
40 php bin/console doctrine:database:import data/sql/mysql_base.sql --env=test
41endif
42ifeq ($(DB), pgsql)
43 psql -h localhost -d wallabag_test -U travis -f data/sql/pgsql_base.sql
44endif
45
46fixtures: ## Load fixtures into database
47 php bin/console doctrine:fixtures:load --no-interaction --env=test
48
49test: prepare fixtures ## Launch wallabag testsuite
50 bin/simple-phpunit -v
31 51
32release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`). 52release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
33ifndef VERSION 53ifndef VERSION
@@ -35,11 +55,9 @@ ifndef VERSION
35endif 55endif
36 @sh scripts/release.sh $(VERSION) $(TMP_FOLDER) $(RELEASE_FOLDER) $(ENV) 56 @sh scripts/release.sh $(VERSION) $(TMP_FOLDER) $(RELEASE_FOLDER) $(ENV)
37 57
38travis: ## Make some stuff for Travis-CI
39
40deploy: ## Deploy wallabag 58deploy: ## Deploy wallabag
41 @bundle exec cap staging deploy 59 @bundle exec cap staging deploy
42 60
43.PHONY: help clean install update build test release travis deploy run dev 61.PHONY: help clean prepare install fixtures update build test release deploy run dev
44 62
45.DEFAULT_GOAL := install 63.DEFAULT_GOAL := install