Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Growl notification task for Phing

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 data
Octocat-spinner-32 src
Octocat-spinner-32 tests
Octocat-spinner-32 README.asciidoc
README.asciidoc

GrowlNotifyTask

Status this task is now included in the Phing distribution since release 2.4.13 (ticket #845)

Features

  • Be notified on long-task when they are finished

  • Don’t forget notification with sticky option

  • Define priority of messages

  • Compatible Windows and Mac/OSX

  • Application is auto-registered

  • May customize application and message icons

Important
Does not support yet encryption and multi-notification types, as PEAR::Net_Growl package allow to do it since version 2.0.0

Dependencies

Requires to install the last version of branch 2.x PEAR::Net_Growl 2.6.0

License

GrowlNotifyTask is licensed under BSD

Installation/Usage

Download the script phing/tasks/ext/GrowlNotifyTask.php from https://github.com/llaville/phing-GrowlNotifyTask/blob/master/src/phing/tasks/ext/GrowlNotifyTask.php to where ever you want.

Caution
You have to fix the path related to classname below depending of where you put the class script GrowlNotifyTask.php
In your project build file, you have to define the GrowlNotifyTask with a taskdef tag
<?xml version="1.0" encoding="UTF-8"?>
<project name="your-project" basedir=".">

    <taskdef name="growlnotify" classname="phing.tasks.ext.GrowlNotifyTask" />

    <!-- ... -->
</project>

Attributes

Name Type Description Default Required

name

String

Name of application to be register

Growl for Phing

No

sticky

Boolean

Indicates if the notification should be sticky

false

No

message

String

Text of notification. Use \n to specify a line break

n/a

Yes

title

String

Title of notification

GrowlNotify

No

notification

String

The notification name/type

General Notification

No

icon

String

The icon of the application being registered.

Must be a valid file type (png, jpg, gif, ico)

Can be any of the following:

* absolute url (http://domain/image.png)

* absolute file path (c:\temp\image.png)

* relative file path (.\folder\image.png)

n/a

No

host

String

The host address to send the notification to

127.0.0.1

No

password

String

The password required to send notifications over lan

n/a

No

priority

String

The notification priority.

Valid values are : low, moderate, normal, high, emergency

normal

No

protocol

String

The protocol used to send the notification.

May be either gntp or udp.

gntp

No

icon

String

The icon to show for the notification

growl icon v2

No

Examples

Send a single notification to a remote host
<?xml version="1.0" encoding="UTF-8"?>
<project name="phing-GrowlNotifyTask" basedir="." default="BroadcastNotification">

    <taskdef name="growlnotify" classname="phing.tasks.ext.GrowlNotifyTask" />

    <target name="BroadcastNotification"
        description="display a single message over network"
    >
        <growlnotify message="Deployment of project LAMBDA is finished."
            host="192.168.1.2"
            password="mamasam"
        />
    </target>

</project>
Send a high notification on local host
<?xml version="1.0" encoding="UTF-8"?>
<project name="phing-GrowlNotifyTask" basedir="." default="BroadcastNotification">

    <taskdef name="growlnotify" classname="phing.tasks.ext.GrowlNotifyTask" />

    <target name="BroadcastNotification"
        description="display a single message over network"
    >
        <growlnotify message="Project LAMBDA build FAILED."
            title="PhingNotify"
            priority="high"
            sticky="true"
            appicon="c:/data/growlPhing.png"
            icon="c:/data/warning.png"
        />
    </target>

</project>
Something went wrong with that request. Please try again.