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