summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeardyman <nornholdj@gmail.com>2015-09-25 17:59:31 -0400
committerbeardyman <nornholdj@gmail.com>2015-09-25 17:59:31 -0400
commit20b7f920e5527f421049a22227759cfe89318cc3 (patch)
tree7d89d85d8892b87cf1ffa566283451a1ef2a3825
parentaeea514f81c652257b64e606c771cc51249db49c (diff)
downloadphp-sparkpost-20b7f920e5527f421049a22227759cfe89318cc3.zip
php-sparkpost-20b7f920e5527f421049a22227759cfe89318cc3.tar.gz
php-sparkpost-20b7f920e5527f421049a22227759cfe89318cc3.tar.bz2
Added post install and post update scripts to generate a template for the new config file
-rw-r--r--.gitignore1
-rw-r--r--composer.json14
2 files changed, 12 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index cd6b314..b15c4c1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
.settings
.buildpath
test/output/
+examples/example-config.json
diff --git a/composer.json b/composer.json
index 096a94b..bfe3797 100644
--- a/composer.json
+++ b/composer.json
@@ -3,11 +3,19 @@
"description": "SDK for interfacing with SparkPost APIs",
"license": "Apache 2.0",
"authors": [
- {
- "name": "Message Systems, Inc."
- }
+ {
+ "name": "Message Systems, Inc."
+ }
],
"minimum-stability": "stable",
+ "scripts": {
+ "post-package-install": "
+ echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json"
+ "post-package-update": "
+ if [ ! -f examples/example-config.json ]
+ echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json
+ fi"
+ },
"require": {
"php": ">=5.3.0",
"guzzlehttp/guzzle": "3.8.1"