diff options
Diffstat (limited to 'GNUmakefile')
-rwxr-xr-x | GNUmakefile | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile index a04468cb..837f7103 100755 --- a/GNUmakefile +++ b/GNUmakefile | |||
@@ -2,7 +2,14 @@ SHELL=bash | |||
2 | TMP_FOLDER=/tmp | 2 | TMP_FOLDER=/tmp |
3 | RELEASE_FOLDER=wllbg-release | 3 | RELEASE_FOLDER=wllbg-release |
4 | 4 | ||
5 | ENV ?= prod | 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 | ||
6 | 13 | ||
7 | help: ## Display this help menu | 14 | 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}' | 15 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
@@ -10,21 +17,26 @@ help: ## Display this help menu | |||
10 | clean: ## Clear the application cache | 17 | clean: ## Clear the application cache |
11 | rm -rf var/cache/* | 18 | rm -rf var/cache/* |
12 | 19 | ||
13 | install: ## Install wallabag with the latest version | 20 | install: customcss ## Install wallabag with the latest version |
14 | @./scripts/install.sh $(ENV) | 21 | @./scripts/install.sh $(ENV) |
15 | 22 | ||
16 | update: ## Update the wallabag installation to the latest version | 23 | update: ## Update the wallabag installation to the latest version |
17 | @./scripts/update.sh $(ENV) | 24 | @./scripts/update.sh $(ENV) |
18 | 25 | ||
19 | dev: ## Install the latest dev version | 26 | dev: ENV=dev |
27 | dev: build customcss ## Install the latest dev version | ||
20 | @./scripts/dev.sh | 28 | @./scripts/dev.sh |
21 | 29 | ||
22 | run: ## Run the wallabag built-in server | 30 | run: ## Run the wallabag built-in server |
23 | @php bin/console server:run --env=dev | 31 | @php bin/console server:run --env=dev |
24 | 32 | ||
25 | build: ## Run webpack | 33 | build: ## Run webpack |
34 | @npm install | ||
26 | @npm run build:$(ENV) | 35 | @npm run build:$(ENV) |
27 | 36 | ||
37 | customcss: | ||
38 | @touch web/custom.css | ||
39 | |||
28 | prepare: clean ## Prepare database for testsuite | 40 | prepare: clean ## Prepare database for testsuite |
29 | ifdef DB | 41 | ifdef DB |
30 | cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml | 42 | cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml |