sed -i is not portable
[pharext/pharext] / Makefile
1 #
2 # build bin/pharext
3 #
4
5 all: bin/pharext
6
7 bin/pharext: src/* src/pharext/* 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 "Creating bin/pharext ... "
11 php -d phar.readonly=0 build/create-phar.php
12 chmod +x $@
13
14 test:
15 @echo "Running tests ... "
16 @phpunit tests
17
18 clean:
19 rm bin/pharext*
20
21 release:
22 @echo "Previous Version: $$(git tag --list | tail -n1)"; \
23 read -p "Release Version: v" VERSION; \
24 echo "Preparing release ... "; \
25 sed -e "s/@PHAREXT_VERSION@/$$VERSION/" build/Version.php.in > src/pharext/Version.php && \
26 $(MAKE) -B SIGN=1 && \
27 git ci -am "release v$$VERSION" && \
28 git tag v$$VERSION && \
29 cp build/Version.php.in src/pharext/Version.php && \
30 git ci -am "back to dev"
31
32 .PHONY: all clean test release