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