Skip to content

Commit

Permalink
Add phar building instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
wapmorgan committed Aug 17, 2017
1 parent be152c9 commit c80ee3a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bin/phpca
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ require $vendor_dir.'/autoload.php';

use wapmorgan\PhpCodeAnalyzer\PhpCodeAnalyzer;

$version = file_exists(__DIR__.'/version.txt') ? trim(file_get_contents(__DIR__.'/version.txt')) : null;
$doc = <<<DOC
PhpCodeAnalyzer $version
Usage:
phpca [-v] [--no-report] [--no-progress] [--since-version=<version>] FILES...
phpca [-v] --extension=<ext> FILES...
Expand Down
18 changes: 17 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,21 @@
"require": {
"docopt/docopt": "~1.0"
},
"bin": ["bin/phpca"]
"bin": ["bin/phpca"],
"extra": {
"phar-builder": {
"compression": "BZip2",
"name": "phpca.phar",
"output-dir": "./",
"entry-point": "bin/phpca",
"include": ["bin", "data"],
"events": {
"command.package.start" : "git describe --tags > bin/version.txt",
"command.package.end": "chmod +x phpca.phar"
}
}
},
"scripts": {
"build": "phar-builder package composer.json"
}
}

0 comments on commit c80ee3a

Please sign in to comment.