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