Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Add support for plain slack messages with no colour
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys Smith committed Sep 11, 2016
1 parent 1325c5c commit 1fbbe9b
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1484,14 +1484,25 @@

<macrodef name="SLACK.send">
<attribute name="conf"/>
<attribute name="colour"/>
<attribute name="colour" default="none"/>
<attribute name="channel"/>
<attribute name="message"/>
<sequential>
<exec executable="bash" failonerror="true">
<arg value="-c"/>
<arg value="echo -e '@{message}' | ${tools.slacktee}/bin/slacktee.sh -p --config @{conf} -a @{colour} -c @{channel}"/>
</exec>
<if>
<equals arg1="@{colour}" arg2="none"/>
<then>
<exec executable="bash" failonerror="true">
<arg value="-c"/>
<arg value="echo -e '@{message}' | ${tools.slacktee}/bin/slacktee.sh -p --config @{conf} -c @{channel}"/>
</exec>
</then>
<else>
<exec executable="bash" failonerror="true">
<arg value="-c"/>
<arg value="echo -e '@{message}' | ${tools.slacktee}/bin/slacktee.sh -p --config @{conf} -a @{colour} -c @{channel}"/>
</exec>
</else>
</if>
</sequential>
</macrodef>

Expand Down

0 comments on commit 1fbbe9b

Please sign in to comment.