-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (55 loc) · 1.27 KB
/
Makefile
File metadata and controls
72 lines (55 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Integration DocuSeal - Makefile
app_name=$(notdir $(CURDIR))
build_dir=$(CURDIR)/build
cert_dir=$(HOME)/.nextcloud/certificates
all: dev-setup build
# Dev environment setup
dev-setup: composer npm
composer:
composer install --prefer-dist
npm:
npm install
# Building
build: npm-build
npm-build:
npm run build
npm-watch:
npm run watch
# Linting
lint: lint-php lint-js lint-css
lint-php:
vendor/bin/psalm --no-cache
lint-js:
npm run lint
lint-css:
npm run stylelint
lint-fix:
npm run lint:fix
# Testing
test: test-php
test-php:
vendor/bin/phpunit -c tests/phpunit.xml
# Cleaning
clean:
rm -rf js/
rm -rf node_modules/
rm -rf vendor/
# Packaging for app store
appstore: clean npm build
mkdir -p $(build_dir)
tar czf $(build_dir)/$(app_name).tar.gz \
--exclude-from=$(CURDIR)/.gitignore \
--exclude=".git" \
--exclude="$(build_dir)" \
--exclude="tests" \
--exclude="src" \
--exclude="node_modules" \
--exclude="webpack.config.js" \
--exclude="Makefile" \
--exclude=".eslintrc.js" \
--exclude=".stylelintrc.js" \
--exclude="psalm.xml" \
--exclude="phpunit.xml" \
--exclude=".github" \
-C $(CURDIR)/.. $(app_name)
.PHONY: all dev-setup composer npm build npm-build npm-watch lint lint-php lint-js lint-css lint-fix test test-php clean appstore