Scripting Releases to Chiara_PEAR_Server

November 6th, 2006 by bbieber Leave a reply »

I’ve been working on some ways to automate release deployment to my PEAR Channel Servers (pear.unl.edu, pear.saltybeagle.com) running Chiara_PEAR_Server.
Right now I have scripts that automatically create the package.xml file using PFM2 and the package tgz files but uploading the release was still a manual process.
The process isn’t that complicated, you log in to the channel server, and upload a file…. the server handles the rest (haha, so punny).

So finally I got friendly with HTTP_Request and wrote a simple class/script to remotely release a pear package to a Chiara_PEAR_Server.

Now it’s even easier to release early, release often.

<?php
/**
 * sample usage of the Salty_PEAR_Server_RemoteReleaseDeployer
 */

require_once 'Salty/PEAR/Server/RemoteReleaseDeployer.php';

$d = new Salty_PEAR_Server_RemoteReleaseDeployer();

$d->adminuri = 'http://pear.saltybeagle.com/admin.php';
$d->username = 'adminhandle';
$d->password = '1234';

if ($d->deployRelease('/home/bbieber/workspace/Salty_PEAR_Server_RemoteReleaseDeployer/Salty_PEAR_Server_RemoteReleaseDeployer-0.0.1.tgz')) {
    echo 'Success!';
} else {
    echo 'Something went terribly wrong.';
}

So what the heck, I made it into a PEAR package.

Salty_PEAR_Server_RemoteReleaseDeployer

Hooray for PEAR Channels!

Advertisement

No comments

Leave a Reply