deck/Makefile

73 строки
1.9 KiB
Makefile
Исходник Обычный вид История

# SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
2016-06-05 16:07:47 +03:00
app_name=$(notdir $(CURDIR))
build_tools_directory=$(CURDIR)/build/tools
2017-01-31 11:59:23 +03:00
build_dir=$(CURDIR)/build/artifacts
2016-06-05 16:07:47 +03:00
source_build_directory=$(CURDIR)/build/artifacts/source
source_package_name=$(source_build_directory)/$(app_name)
appstore_build_directory=$(CURDIR)/build/artifacts/appstore
appstore_package_name=$(appstore_build_directory)/$(app_name)
npm=$(shell which npm 2> /dev/null)
composer=$(shell which composer 2> /dev/null)
2017-01-31 11:59:23 +03:00
sign_dir=$(build_dir)/sign
cert_dir=$(HOME)/.nextcloud/certificates
2016-06-05 16:07:47 +03:00
default: build
2016-06-05 16:07:47 +03:00
2017-01-31 11:59:23 +03:00
clean-dist:
rm -rf node_modules/
2016-06-05 16:07:47 +03:00
install-deps: install-deps-js
composer install
install-deps-nodev: install-deps-js
composer install --no-dev
install-deps-js:
npm ci
2017-01-31 11:59:23 +03:00
build: clean-dist install-deps build-js
2016-06-05 16:07:47 +03:00
release: clean-dist install-deps-nodev build-js
lint: lint-js lint-php
lint-js:
npm run lint
npm run stylelint
lint-php:
composer run lint 1>/dev/null
composer run cs:check
build-js: install-deps-js
npm run build
build-js-dev: install-deps
npm run dev
2017-01-31 11:59:23 +03:00
watch:
npm run watch
test: test-unit test-integration
2016-06-05 16:07:47 +03:00
test-unit:
2017-01-31 13:11:59 +03:00
mkdir -p build/
2016-06-05 16:07:47 +03:00
ifeq (, $(shell which phpunit 2> /dev/null))
@echo "No phpunit command available, downloading a copy from the web"
mkdir -p $(build_tools_directory)
curl -sSL https://phar.phpunit.de/phpunit-8.2.phar -o $(build_tools_directory)/phpunit.phar
2017-01-31 13:11:59 +03:00
php $(build_tools_directory)/phpunit.phar -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml
php $(build_tools_directory)/phpunit.phar -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml
2016-06-05 16:07:47 +03:00
else
phpunit -c tests/phpunit.integration.xml --testsuite=integration-database --coverage-clover build/php-integration.coverage.xml
2016-08-16 19:47:22 +03:00
endif
test-integration:
cd tests/integration && ./run.sh
test-js: install-deps
npm run test