forked from twilio/twilio-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (57 loc) · 1.76 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Twilio API helper library.
# See LICENSE file for copyright and license details.
define LICENSE
<?php
/**
* Twilio API helper library.
*
* @category Services
* @package Services_Twilio
* @author Neuman Vong <[email protected]>
* @license http://creativecommons.org/licenses/MIT/ MIT
* @link http://pear.php.net/package/Services_Twilio
*/
endef
export LICENSE
COMPOSER = $(shell which composer)
ifeq ($(strip $(COMPOSER)),)
COMPOSER = php composer.phar
endif
all: test
clean:
@rm -rf dist venv
PHP_FILES = `find dist -name \*.php`
dist: clean
@mkdir dist
@git archive master | (cd dist; tar xf -)
@for php in $(PHP_FILES); do\
echo "$$LICENSE" > $$php.new; \
tail -n+2 $$php >> $$php.new; \
mv $$php.new $$php; \
done
test-install:
# Composer: http://getcomposer.org/download/
$(COMPOSER) install
install:
pear channel-discover twilio.github.com/pear
pear install twilio/Services_Twilio
# if these fail, you may need to install the helper library - run "make
# test-install"
test:
@PATH=vendor/bin:$(PATH) phpunit --strict --colors --configuration tests/phpunit.xml;
venv:
virtualenv venv
docs-install: venv
. venv/bin/activate; pip install -r docs/requirements.txt
docs:
. venv/bin/activate; cd docs && make html
release-install:
pear channel-discover twilio.github.com/pear || true
pear channel-discover pear.pirum-project.org || true
pear install pirum/Pirum || true
pear install XML_Serializer-0.20.2 || true
pear install PEAR_PackageFileManager2 || true
authors:
echo "Authors\n=======\n\nA huge thanks to all of our contributors:\n\n" > AUTHORS.md
git log --raw | grep "^Author: " | cut -d ' ' -f2- | cut -d '<' -f1 | sed 's/^/- /' | sort | uniq >> AUTHORS.md
.PHONY: all clean dist test docs docs-install test-install authors