Skip to content

Commit 42d71ad

Browse files
committed
Include vendors in the phar
1 parent 47b818f commit 42d71ad

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

Makefile

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ update-min:
1515
composer update --prefer-stable --prefer-lowest
1616
.PHONY: update-min
1717

18+
update-no-dev:
19+
composer update --prefer-stable --no-dev
20+
.PHONY: update-no-dev
21+
1822
test: vendor cs deptrac phpunit infection
1923
.PHONY: test
2024

@@ -44,13 +48,19 @@ phpunit: tools/phpunit
4448
tools: tools/php-cs-fixer tools/deptrac tools/infection tools/phpab
4549
.PHONY: tools
4650

47-
package: install tools/phpab
51+
clean:
52+
rm -rf build
53+
.PHONY: clean
54+
55+
package: clean update-no-dev tools/phpab
4856
$(eval VERSION=$(shell git describe --abbrev=0 --tags 2> /dev/null | sed -e 's/^v//' || echo 'dev'))
49-
@echo $(VERSION)
50-
rm -rf build/phar && mkdir -p build/phar
51-
cp LICENSE build/phar/
52-
sed -e 's/@@version@@/$(VERSION)/g' manifest.xml.in > build/phar/manifest.xml
53-
mkdir -p build/phar/zalas-phpunit-injector-extension && cp -r src build/phar/zalas-phpunit-injector-extension/
57+
@mkdir -p build/phar
58+
@cp LICENSE build/phar/
59+
@sed -e 's/@@version@@/$(VERSION)/g' manifest.xml.in > build/phar/manifest.xml
60+
@mkdir -p build/phar/zalas-phpunit-injector-extension && cp -r src build/phar/zalas-phpunit-injector-extension/
61+
@composer show -N -D | grep -v phpunit/phpunit | tr -d ' ' \
62+
| xargs -IXXX composer show XXX -t | grep / | sed -e 's/^[| `-]*\([^ ]*\) .*/\1/' | sort -u \
63+
| xargs -IXXX rsync -a --relative vendor/XXX build/phar/zalas-phpunit-injector-extension/
5464
[ -f .travis/phpunit-injector-extension-private.pem ] \
5565
&& tools/phpab --all --static --once --phar --key .travis/phpunit-injector-extension-private.pem --output build/zalas-phpunit-injector-extension.phar build/phar \
5666
|| tools/phpab --all --static --once --phar --output build/zalas-phpunit-injector-extension-$(VERSION).phar build/phar

0 commit comments

Comments
 (0)