drewish


Publishing pecl channels to GitHub   16 August 2012

This is the process I used to publish a pecl channel for phpredis to GitHub pages. You can read the full background on the issue.

Install prium:

$ pear channel-discover pear.pirum-project.org
$ pear install pirum/Pirum

Create a pages repo. I did this as a separate checkout in a sibling directory:

$ git clone git@github.com:drewish/phpredis.git phpredis-channel
$ cd phpredis-channel
$ git checkout --orphan gh-pages
$ git rm -rf .

Configure the pirum.xml file then build the channel:

$ pirum build .

Add your channel to pear/pecl (this also validates it and warns you of any problems before you push it up to github):

$ pecl channel-add channel.xml

If that looks good then add all files and push it:

$ git add -A
$ git commit -m "Created the channel."
$ git push origin gh-pages

Hop up a directory (since I’ve got them as siblings):

$ cd ..

Package up a release:

$ pecl package phpredis/package.xml

Switch into the pages repo:

$ cd phpredis-channel

Add the release to the channel:

$ pirum add . PhpRedis-2.2.1.tgz

If that doesn’t have any errors then commit the changes and push them:

$ git add -A
$ git commit -m "Adding the PhpRedis-2.2.1 release."
$ git push origin gh-pages

Sources

← Back to the top