From cde4d396245434a9e62f7e01cef131a27ff4ec60 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 25 Mar 2016 18:24:17 +0100 Subject: try to use local composer if possible --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cd608814c..bef809347 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ app_name=$(notdir $(CURDIR)) build_directory=$(CURDIR)/build/artifacts/source package_name=$(build_directory)/$(app_name) +npm=$(shell which npm) all: build @@ -12,14 +13,20 @@ build: .PHONY: composer composer: +ifeq (, $(shell which composer)) + @echo "Using composer from website" curl -sS https://getcomposer.org/installer | php php composer.phar install --prefer-dist php composer.phar update --prefer-dist rm -f composer.phar +else + composer install --prefer-dist + composer update --prefer-dist +endif .PHONY: npm npm: - cd js && npm run build + cd js && $(npm) run build .PHONY: clean clean: @@ -44,6 +51,6 @@ dist: .PHONY: test test: - cd js && npm run test + cd js && $(npm) run test phpunit -c phpunit.xml phpunit -c phpunit.integration.xml -- cgit v1.2.3