[WIP] Add a `self-update` command to update local phpmnd.phar from Github releases
- Adds a
self-updatecommand (not loaded unless running a phar). Alsoself-update --check(check if new version) andself-update --rollback(revert to previous version). - Renames default
phpmndcommand torun(bash script edited to inject sophpmndworks exactly as-is). - Some remapping to allow
--helpand--version/-Vas expected. - Updates are linked to stable Github releases (no version constraints included).
- Dependency to
padraic/phar-updateradded. - PHP_CodeSniffer add to exclude list when creating a PHAR.
Noted as WIP for feedback. Having a run command - there's probably a better way to have a default command (where $_SERVER['argv'] isn't manipulated outside of symfony/console). This also omits the self-update command from --help.
Works, but may need some tidying for those two points.
I need to take a better look on this :)
Thanks for the review @povils - made some changes. Missed your comment on the text colouring if you have specific colour codes to fit in with your preferred theme.
@povils Pretty much done, but I may add a few changes towards the weekend to take advantage of a new phar-updater release expected shortly, and someone may know if the fugly argv function has a more...elegant solution.