Usage examples

Build a simple PHAR file

caverman build [project dir]  

PHAR files generated without a signature are protected with a weak CRC mechanism based in MD5.

Build a self-executable compressed PHAR file

caverman build [project dir] -x -z

Build a self-executable signed file

First you have to create a public/private key pairs in PEM format. You can achieve that in the following way:

openssl genrsa -out private.pem 4096
openssl rsa -in private.pem -pubout -out public.pem

Build the signed PHAR

caverman build [project dir] -x --private-key=private.pem

Rename the public key as the PHAR name and the extension .pubkey, so for example if the generated PHAR file is "app_1.0.phar" then you have to rename the public key as "app_1.0.phar.pubkey". You have to copy the public key together with you PHAR file because in other way your PHAR is not going to be executed correctly.

Build a PHAR file and increase the minor version for the next build

caverman build [project dir] --inc-minor

Increase the major version for the next build

caverman inc-major [project dir]

Decrease the minor version for the next build

caverman dec-minor [project dir]

Build a self-executable compressed PHAR file and increase the minor version for the next build

caverman build [project dir] -z -x --inc-minor