generated from JBZoo/Skeleton-PHP
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
86 lines (70 loc) · 3.31 KB
/
Makefile
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#
# JBZoo Toolbox - Composer-Diff.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @see https://github.com/JBZoo/Composer-Diff
#
.PHONY: build
ifneq (, $(wildcard ./vendor/jbzoo/codestyle/src/init.Makefile))
include ./vendor/jbzoo/codestyle/src/init.Makefile
endif
build: ##@Project Install all 3rd party dependencies
$(call title,"Install/Update all 3rd party dependencies")
@composer install --optimize-autoloader --no-progress
@make build-phar
@make create-symlink
update: ##@Project Install/Update all 3rd party dependencies
$(call title,"Install/Update all 3rd party dependencies")
@composer update --optimize-autoloader --no-progress
@make build-phar
@make create-symlink
$(call title,"Show difference in composer.lock")
@$(PHP_BIN) `pwd`/vendor/bin/composer-diff --output=markdown
create-symlink: ##@Project Create Symlink (alias for testing)
@ln -sfv `pwd`/build/composer-diff.phar `pwd`/vendor/bin/composer-diff
build-docker: ##@Project Building Docker Image
$(call title,"Building Docker Image")
@docker build -t jbzoo-composer-diff .
test-all: ##@Project Run all project tests at once
@make test
@make test-drupal
@make test-manual
@make codestyle
@-make report-merge-coverage
test-drupal:
$(call title,"Testing real project - Drupal")
@echo ""
@echo " Example. Comparing Drupal v8.9.1 vs v9.0.1 (required only)"
@echo ""
@php ./composer-diff \
--source="`pwd`/tests/fixtures/testDrupal/composer-8.9.1.lock" \
--target="`pwd`/tests/fixtures/testDrupal/composer-9.0.1.lock" \
--env=require \
-vvv
test-manual:
$(call title,"Testing output")
@echo ""
@echo " Example. Just dummy example"
@echo ""
@php ./composer-diff \
--source="`pwd`/tests/fixtures/testComparingComplexSimple/composer-lock-from.json" \
--target="`pwd`/tests/fixtures/testComparingComplexSimple/composer-lock-to.json" \
--env=require \
-vvv
@php ./composer-diff \
--source="`pwd`/tests/fixtures/testComparingComplexSimple/composer-lock-from.json" \
--target="`pwd`/tests/fixtures/testComparingComplexSimple/composer-lock-to.json" \
--env=require \
--output=markdown \
-vvv
@php ./composer-diff \
--source="`pwd`/tests/fixtures/testComparingComplexSimple/composer-lock-from.json" \
--target="`pwd`/tests/fixtures/testComparingComplexSimple/composer-lock-to.json" \
--env=require \
--output=json \
-vvv