note PUSHER_* environment variables in readme

This commit is contained in:
Sami Samhuri 2011-06-05 00:47:49 -07:00
parent d4f78bd6e6
commit b4584a82a9

View file

@ -13,6 +13,8 @@ run `npm i --global thepusher`.
Run `thepusher` from the command line. It does not daemonize itself, it only logs to Run `thepusher` from the command line. It does not daemonize itself, it only logs to
stdout, and it doesn't run at startup. Yet. Pull requests accepted and encouraged. stdout, and it doesn't run at startup. Yet. Pull requests accepted and encouraged.
## Configuration
ThePusher's config file resides at `~/.pusher` and looks like this: ThePusher's config file resides at `~/.pusher` and looks like this:
host github.samhuri.net host github.samhuri.net
@ -40,7 +42,7 @@ ThePusher's config file resides at `~/.pusher` and looks like this:
# any tag is deleted in "my-project" # any tag is deleted in "my-project"
delete tag my-project:* delete-build-for-tag.sh delete tag my-project:* delete-build-for-tag.sh
As you probably noticed triggers follow the form: As you may have noticed triggers follow the form:
<action> <ref type> <owner/repo:ref> <command> <action> <ref type> <owner/repo:ref> <command>
@ -59,6 +61,22 @@ name it's the branch or tag name, effectively `*/*:name`.
Everything after the ref spec is the command. Commands are not quoted, just good old Everything after the ref spec is the command. Commands are not quoted, just good old
terrible space splitting. terrible space splitting.
## Commands
A few environment variables are set so that commands know what triggered them.
Their names should give away their values:
* `PUSHER_ACTION`
* `PUSHER_OWNER`
* `PUSHER_REPO`
* `PUSHER_REFTYPE`
* `PUSHER_BRANCH`
* `PUSHER_TAG`
Only one of `PUSHER_BRANCH` or `PUSHER_TAG` will bet set, and that will correspond
with the value of `PUSHER_REFTYPE` which is either `branch` or `tag`.
## License ## License
(The MIT License) (The MIT License)