devgiants / phar-application
Boilerplate for fully maintenable PHP CLI applications packaged in PHAR
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
This package is auto-updated.
Last update: 2024-04-19 01:37:22 UTC
README
## Description
Embed everything needed to create a fully maintenable PHAR application
## Installation
composer create-project devgiants/phar-application
Usage (TODO)
- Set .env and app/bin/.env
- Change src/App to your namespace
- app/src/composer.json
- All namespaces calls
- Change box.json for app name
- Use Model/ApplicationCommand for common model with DI and logging
PHAR Packager
This bash script goal is to ease tedious PHAR packaging process for a open-source app published on Github. This script is very specific to following case :
- Open-source project hosted on Github
- Use Box for create package
- Use Kherge version (abandoned) to handle version number. TODO is to switch to maintained project ASAP
- Use a manifest system to publish phar archive to gh-pages. You can have live example on applications I created such as livebox or websites-backup
Usage
Just make sur your local master
branch is up-to-date, with README updated with good version number (the one you publish). Then:
./make-phar -n appname -v 1.2.3
This will do, in order :
- Create local tag with version passed as argument
- Push
master
branch to remote repo - Push tags to remote repo
- Build PHAR using
box
- Move generated PHAR to
/tmp
- Checkout to
gh-pages
- Move generated archive from
/tmp
todownloads/{appname}-{version}.phar
- Create matching manifest file
- Push everything to
gh-page
remote branch. - Switch back to
master