Skip to content

Commit 70ffc11

Browse files
Add commands to install box and build cgr.phar
1 parent 6d1726c commit 70ffc11

File tree

5 files changed

+36
-1
lines changed

5 files changed

+36
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
*.phar
12
composer.lock
23
vendor
34
build

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ script:
3232

3333
after_success:
3434
- travis_retry php vendor/bin/coveralls -v
35+
36+
before_deploy:
37+
- composer phar:install-tools
38+
- composer phar:build

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you have not already done so, you will also need to add the `vendor/bin` from
2828

2929
To add the correct bin directory to your PATH:
3030
```
31-
PATH="$(composer config home)/vendor/bin:$PATH"
31+
PATH="$(composer config -g home)/vendor/bin:$PATH"
3232
```
3333

3434
Example:

box.json.dist

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"alias": "cgr.phar",
3+
"chmod": "0755",
4+
"compactors": [],
5+
"directories": ["src","help","bin"],
6+
"files": ["README.md"],
7+
"finder": [
8+
{
9+
"name": "*.php",
10+
"exclude": [
11+
"test",
12+
"tests",
13+
"Test",
14+
"Tests",
15+
"Tester"
16+
],
17+
"in": "vendor"
18+
}
19+
],
20+
"git-commit": "git-commit",
21+
"git-version": "git-version",
22+
"output": "cgr.phar",
23+
"main": "bin/cgr",
24+
"stub": true
25+
}

composer.json

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
"squizlabs/php_codesniffer": "2.*"
2020
},
2121
"scripts": {
22+
"phar:install-tools": [
23+
"gem install mime-types -v 2.6.2",
24+
"curl -LSs https://box-project.github.io/box2/installer.php | php"
25+
],
26+
"phar:build": "PATH=.:$PATH box.phar build",
2227
"test": [ "@phpunit", "@cs" ],
2328
"phpunit": "phpunit --colors=always",
2429
"cs": "phpcs --standard=PSR2 -n src",

0 commit comments

Comments
 (0)