less noisy Makefile
[pharext/pharext] / Makefile
1 #
2 # build bin/pharext
3 #
4
5 all: bin/pharext
6
7 bin/pharext: src/* src/pharext/*
8 @echo "Linting changed source files ... "
9 @for file in $?; do php -l $$file | sed -ne '/^No syntax errors/!p' && exit $${PIPESTATUS[0]}; done
10 @echo "Running tests ... "
11 @phpunit tests
12 @echo "Creating bin/pharext ... "
13 php -d phar.readonly=0 build/create-phar.php
14 chmod +x $@
15
16 test:
17 @echo "Running tests ... "
18 @phpunit tests
19
20 clean:
21 rm bin/pharext*
22
23 release:
24 @echo "Previous Version: $$(git tag --list | tail -n1)"; \
25 read -p "Release Version: v" VERSION; \
26 echo "Preparing release ... "; \
27 sed -i '' -e "s/@PHAREXT_VERSION@/$$VERSION/" src/pharext/Version.php; \
28 $(MAKE); \
29 git ci -am "release v$$VERSION"; \
30 git tag v$$VERSION; \
31 sed -i '' -e "s/$$VERSION/@PHAREXT_VERSION@/" src/pharext/Version.php; \
32 git ci -am "back to dev"
33
34
35 .PHONY: all clean test release