Skip to content

Commit 20b7f92

Browse files
committed
Added post install and post update scripts to generate a template for the new config file
1 parent aeea514 commit 20b7f92

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.settings
44
.buildpath
55
test/output/
6+
examples/example-config.json

composer.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,19 @@
33
"description": "SDK for interfacing with SparkPost APIs",
44
"license": "Apache 2.0",
55
"authors": [
6-
{
7-
"name": "Message Systems, Inc."
8-
}
6+
{
7+
"name": "Message Systems, Inc."
8+
}
99
],
1010
"minimum-stability": "stable",
11+
"scripts": {
12+
"post-package-install": "
13+
echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json"
14+
"post-package-update": "
15+
if [ ! -f examples/example-config.json ]
16+
echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json
17+
fi"
18+
},
1119
"require": {
1220
"php": ">=5.3.0",
1321
"guzzlehttp/guzzle": "3.8.1"

0 commit comments

Comments
 (0)