2014-03-18 19:26:01 +00:00
|
|
|
tag = $(shell git describe)
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo ' PHP Server Monitor - $(tag) '
|
|
|
|
@echo ' - make export [tag=...] - create a new release from tag '
|
|
|
|
|
|
|
|
export:
|
|
|
|
@echo 'Building release for tag $(tag) '
|
2014-04-06 14:52:58 +00:00
|
|
|
mkdir -p ./build ./build/phpservermon
|
2014-04-10 16:29:53 +00:00
|
|
|
rm -rf ./build/phpservermon/*
|
2014-03-18 19:26:01 +00:00
|
|
|
git archive $(tag) | tar -xf - -C ./build/phpservermon/
|
2014-04-06 14:52:58 +00:00
|
|
|
@echo 'Testing on syntax errors (thats all the automated testing your are going to get for now..) '
|
|
|
|
find ./build/phpservermon -name "*.php" | xargs -I file php -l file
|
2014-03-18 19:26:01 +00:00
|
|
|
find ./build/phpservermon -name "*.php" -exec sed -i "" "s/@package_version@/$(tag)/" {} \;
|
2014-04-24 21:31:48 +00:00
|
|
|
@echo 'Downloading dependencies'
|
|
|
|
cd ./build/phpservermon; php composer.phar install; cd ../../;
|
|
|
|
rm -f ./build/phpservermon/composer.phar
|
|
|
|
rm -f ./build/phpservermon/composer.json
|
|
|
|
rm -f ./build/phpservermon/composer.lock
|
2014-04-10 16:29:53 +00:00
|
|
|
@echo 'Building HTML documentation'
|
|
|
|
cd ./build/phpservermon/docs; make BUILDDIR=. html; cd ../../../;
|
|
|
|
@echo 'Cleaning up docs dir'
|
2014-04-12 11:38:26 +00:00
|
|
|
rm -f ./build/phpservermon/Makefile
|
2014-04-10 16:29:53 +00:00
|
|
|
rm -f ./build/phpservermon/docs/Makefile
|
|
|
|
rm -f ./build/phpservermon/docs/make.bat
|
|
|
|
rm -f ./build/phpservermon/docs/conf.py
|
|
|
|
@echo 'Setting folder and file permissions'
|
2014-03-29 14:53:31 +00:00
|
|
|
find ./build/phpservermon -type f | xargs chmod 0644
|
|
|
|
find ./build/phpservermon -type d | xargs chmod 0755
|
2014-04-10 16:29:53 +00:00
|
|
|
@echo 'Creating archives'
|
2014-03-18 19:26:01 +00:00
|
|
|
cd ./build; zip -rq phpservermon-$(tag).zip ./phpservermon; cd ../;
|
|
|
|
cd ./build; tar -pczf phpservermon-$(tag).tar.gz ./phpservermon; cd ../;
|
|
|
|
rm -rf ./build/phpservermon
|
|
|
|
@echo 'Building release finished '
|