From b1574a39877d69cdf54111b0fb108039c21eae5f Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Thu, 29 Aug 2019 21:27:56 +1000 Subject: Make dev depend on build Also, run `npm install` before building. Signed-off-by: Olivier Mehani --- GNUmakefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index a04468cb..15d737db 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -16,13 +16,15 @@ install: ## Install wallabag with the latest version update: ## Update the wallabag installation to the latest version @./scripts/update.sh $(ENV) -dev: ## Install the latest dev version +dev: ENV=dev +dev: build ## Install the latest dev version @./scripts/dev.sh run: ## Run the wallabag built-in server @php bin/console server:run --env=dev build: ## Run webpack + @npm install @npm run build:$(ENV) prepare: clean ## Prepare database for testsuite -- cgit v1.2.3 From 7a4c375ebfae5aa43c663b1084acfb68f61b30b8 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Wed, 9 Oct 2019 18:20:26 +0200 Subject: =?UTF-8?q?=E2=9C=A8=20Allow=20custom=20styles=20system=20wide?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Should fix #4060 --- GNUmakefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 15d737db..865b35e8 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -10,14 +10,14 @@ help: ## Display this help menu clean: ## Clear the application cache rm -rf var/cache/* -install: ## Install wallabag with the latest version +install: customcss ## Install wallabag with the latest version @./scripts/install.sh $(ENV) update: ## Update the wallabag installation to the latest version @./scripts/update.sh $(ENV) dev: ENV=dev -dev: build ## Install the latest dev version +dev: build customcss ## Install the latest dev version @./scripts/dev.sh run: ## Run the wallabag built-in server @@ -27,6 +27,9 @@ build: ## Run webpack @npm install @npm run build:$(ENV) +customcss: + @touch web/custom.css + prepare: clean ## Prepare database for testsuite ifdef DB cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml -- cgit v1.2.3 From 49eb5405debb49d19c58f966b4fceac9ea9571ae Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 13 Jan 2020 14:26:10 +0100 Subject: Ensure ENV is well defined when using make This command should fail before calling other commands (which will fail to because the environment is wrong): ``` ENV=toto make install ``` --- GNUmakefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 865b35e8..db87c5d2 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -2,7 +2,17 @@ SHELL=bash TMP_FOLDER=/tmp RELEASE_FOLDER=wllbg-release -ENV ?= prod +# ensure the ENV variable is well defined +ifeq ($(origin ENV), prod) + # all good ("prod" is a valid env) +else ifeq ($(origin ENV), dev) + # all good ("dev" is a valid env) +else ifeq ($(origin ENV), test) + # all good ("test" is a valid env) +else + # not good, force it to "prod" + override ENV = prod +endif help: ## Display this help menu @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' -- cgit v1.2.3 From 29f5515959de45a7f2971756e3563995c425c2c2 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 13 Jan 2020 15:58:59 +0100 Subject: Improve check by using list See https://stackoverflow.com/a/27335439/569101 --- GNUmakefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index db87c5d2..837f7103 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -3,12 +3,9 @@ TMP_FOLDER=/tmp RELEASE_FOLDER=wllbg-release # ensure the ENV variable is well defined -ifeq ($(origin ENV), prod) - # all good ("prod" is a valid env) -else ifeq ($(origin ENV), dev) - # all good ("dev" is a valid env) -else ifeq ($(origin ENV), test) - # all good ("test" is a valid env) +AVAILABLE_ENV := prod dev test +ifneq ($(filter $(ENV),$(AVAILABLE_ENV)),) + # all good else # not good, force it to "prod" override ENV = prod -- cgit v1.2.3