cloud_bbb/Makefile

74 lines
1.5 KiB
Makefile
Raw Permalink Normal View History

2020-04-26 11:36:41 +02:00
# This file is licensed under the Affero General Public License version 3 or
# later. See the COPYING file.
app_name=$(notdir $(CURDIR))
build_tools_directory=$(CURDIR)/build/tools
composer=$(shell which composer 2> /dev/null)
all: dev-setup lint build-js-production test
build: install-composer-deps build-js
# Dev env management
2020-04-26 12:13:24 +02:00
dev-setup: clean clean-dev install-composer-deps-dev js-init
2020-04-26 11:36:41 +02:00
composer.phar:
curl -sS https://getcomposer.org/installer | php
install-composer-deps: composer.phar
php composer.phar install --no-dev -o
install-composer-deps-dev: composer.phar
php composer.phar install -o
2020-04-26 12:13:24 +02:00
js-init:
2020-04-26 11:36:41 +02:00
yarn install
yarn-update:
yarn update
# Building
2020-04-26 12:13:24 +02:00
build-js: js-init
2020-04-26 11:36:41 +02:00
yarn run dev
2020-04-26 12:13:24 +02:00
build-js-production: js-init
2020-04-26 11:36:41 +02:00
yarn run build
2020-04-26 12:13:24 +02:00
watch-js: js-init
2020-04-26 11:36:41 +02:00
yarn run watch
# Linting
2020-04-26 12:13:24 +02:00
lint: js-init
2020-04-26 11:36:41 +02:00
yarn run lint
2020-04-26 12:13:24 +02:00
lint-fix: js-init
2020-04-26 11:36:41 +02:00
yarn run lint:fix
# Style linting
2020-04-26 12:13:24 +02:00
stylelint: js-init
2020-04-26 11:36:41 +02:00
yarn run stylelint
2020-04-26 12:13:24 +02:00
stylelint-fix: js-init
2020-04-26 11:36:41 +02:00
yarn run stylelint:fix
phplint:
./vendor/bin/php-cs-fixer fix --dry-run
phplint-fix:
./vendor/bin/php-cs-fixer fix
# Cleaning
clean:
rm -rf js/*
clean-dev:
rm -rf node_modules
2020-04-26 12:13:24 +02:00
pack:
mkdir -p archive
2020-04-26 13:26:34 +02:00
tar --exclude='./Makefile' --exclude='./webpack*' --exclude='./.*' --exclude='./ts' --exclude='./tests' --exclude='./node_modules' --exclude='./archive' -zcvf ./archive/cloud_bbb.tar.gz . --transform s/^./bbb/
2020-04-26 12:13:24 +02:00
2020-04-26 11:36:41 +02:00
# Tests
test:
./vendor/phpunit/phpunit/phpunit -c phpunit.xml
./vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml