Skip to content

Commit

Permalink
Add license header during make dist
Browse files Browse the repository at this point in the history
  • Loading branch information
luciferous committed Mar 14, 2011
1 parent a421959 commit 868e36c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 4 deletions.
22 changes: 22 additions & 0 deletions LICENSE
@@ -0,0 +1,22 @@
MIT License

Copyright (C) 2011, Twilio, Inc. <help at twilio dot com>
Copyright (C) 2011, Neuman Vong <neuman at twilio dot com>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
33 changes: 29 additions & 4 deletions Makefile
@@ -1,13 +1,38 @@
# Twilio API helper library.
# See LICENSE file for copyright and license details.

all: dist test
define LICENSE
<?php

dist:
@echo creating package
/**
* Twilio API helper library.
*
* @category Services
* @package Services_Twilio
* @author Neuman Vong <neuman@twilio.com>
* @license http://creativecommons.org/licenses/MIT/ MIT
* @link http://pear.php.net/package/Services_Twilio
*/
endef
export LICENSE

all: test

clean:
@rm -rf dist

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:
@echo running tests
@phpunit --configuration tests/phpunit.xml

.PHONY: all dist test
.PHONY: all clean dist test

0 comments on commit 868e36c

Please sign in to comment.