-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Chris Putnam edited this page Apr 7, 2020
·
7 revisions
OK, so you read this and your situation also seems like a good use-case for a PHP console tool? Here we go then!
- Clone this repository to the directory of your choice. This directory can be kept and updated for future use, and will inlude a special tool to help you create and managed console tools that you build. We'll refer to the directory as "~/dev/pcon"
- CD to your local pcon folder (cd ~/dev/pcon)
- Make sure the 'pcon' script file is executable - run
chmod +x ./pcon
- CD to your local pcon folder (cd ~/dev/pcon)
- Run
./pcon create
(optionally, run./pcon help create
to see usage) - Follow prompts to specify details
- Program your functionality
Reference Development Cookbook section
- CD to your local pcon folder (cd ~/dev/pcon)
- Run
./pcon package
(optionally, run./pcon help package
to see usage) - Follow prompts to specify deails
- Note the hash that is output during packaging, to use for delivery
Delivery strategies may vary, but here is an example with github:
-
Within your repository, add a 'dist' folder, and place your packaged script here
-
In your github readme, include lines like these:
Download Latest Version (1.0.1): https://raw.githubusercontent.com/chrisputnam9/pcon/master/tests/dist/test-thing-script Latest Version Hash (md5): 8a8a3682d7ad710ed7e4a780b4678b74
If you adjust the wording or organization, adjust the update regex patterns in your PHP accordingly.
-
Update update_* properties in your code to point to the readme file url
-
Update the hash and version number whenever you package and deploy a new version