diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-03-25 18:24:17 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-03-25 18:24:17 +0100 |
commit | cde4d396245434a9e62f7e01cef131a27ff4ec60 (patch) | |
tree | 19e28b394ce36047f56533774fd99d936fd02ca1 /Makefile | |
parent | d86071f69a99dd56d2b31121ab0cc17f2a314e8c (diff) |
try to use local composer if possible
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 |