Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-09-09 17:37:01 +0300
committerJoas Schilling <coding@schilljs.com>2020-09-10 10:41:33 +0300
commit095c376166604fdc9a99db1083a3fa421810f0cd (patch)
tree015a1cbaeff71b3e90c85f0e736af096cc903f79 /Makefile
parent5024328a13a11a6d751888ab24f33a14c663777d (diff)
"App tutorial"ize this app
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5c4f38e..b65545b 100644
--- a/Makefile
+++ b/Makefile
@@ -4,11 +4,27 @@ project_dir=$(CURDIR)/../$(app_name)
build_dir=$(CURDIR)/build
source_dir=$(build_dir)/$(app_name)
sign_dir=$(build_dir)/sign
+composer=$(shell which composer 2> /dev/null)
all: dev-setup build-js-production
dev-setup: clean clean-dev npm-init
+# Installs and updates the composer dependencies. If composer is not installed
+# a copy is fetched from the web
+composer:
+ifeq (, $(composer))
+ @echo "No composer command available, downloading a copy from the web"
+ mkdir -p $(build_tools_directory)
+ curl -sS https://getcomposer.org/installer | php
+ mv composer.phar $(build_tools_directory)
+ php $(build_tools_directory)/composer.phar install --prefer-dist
+ php $(build_tools_directory)/composer.phar update --prefer-dist
+else
+ composer install --prefer-dist
+ composer update --prefer-dist
+endif
+
npm-init:
npm install