Skip to content

Commit

Permalink
Slack notification channel. See: #132
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswsinc committed Aug 24, 2016
1 parent 110bcef commit 8e6e194
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/psr4/setups/properties/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,17 @@
</else>
</if>

<!-- Slack channel for this project. -->

<if>
<and>
<isset property="project_slug" />
</and>
<then>
<php expression="preg_replace('/[_\-]+(?:lite|pro)$/ui', '', '${project_slug}')" returnProperty="_project_slack_channel" level="verbose" />
</then>
</if>

<!-- The current project version string. -->
<!-- When on a release branch, the version is forced to match. -->

Expand Down
2 changes: 1 addition & 1 deletion src/psr4/targets/releases/grand-finale.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<isTrue value="${slack-enable}" />
</or>
<then>
<adHocSlackNotify text="*${project_title}:* &lt;${_releases_grand_finale_release_url}|v${project_version}&gt; release completed successfully." attachmentColor="#3DAF59" attachmentAuthorIcon="https://websharks.org/wp-content/uploads/2016/06/attachment-icon.png" attachmentAuthorName="Release URLs are as follows:" attachmentText="${_releases_grand_finale_release_urls}" attachmentFooter="Please keep pro software URLs private!" attachmentFooterIcon="https://websharks.org/wp-content/uploads/2016/06/warning-icon.png" cleanUrlLines="true" />
<adHocSlackNotify channel="${_project_slack_channel}" text="*${project_title}:* &lt;${_releases_grand_finale_release_url}|v${project_version}&gt; release completed successfully." attachmentColor="#02568D" attachmentAuthorIcon="https://websharks.org/wp-content/uploads/2016/06/attachment-icon.png" attachmentAuthorName="Release URLs are as follows:" attachmentText="${_releases_grand_finale_release_urls}" attachmentFooter="Please keep pro software URLs private!" attachmentFooterIcon="https://websharks.org/wp-content/uploads/2016/06/warning-icon.png" cleanUrlLines="true" />
<echo />
</then>
</if>
Expand Down
2 changes: 1 addition & 1 deletion src/psr4/targets/uploads/bleeding-edge-finale.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<isTrue value="${slack-enable}" />
</or>
<then>
<adHocSlackNotify text="*${project_title}*: bleeding edge updated to v${project_version}." attachmentColor="#710100" attachmentAuthorIcon="https://websharks.org/wp-content/uploads/2016/06/attachment-icon.png" attachmentAuthorName="Bleeding edge URLs are as follows:" attachmentText="${_uploads_bleeding_edge_finale_urls}" attachmentFooter="Please keep pro software URLs private!" attachmentFooterIcon="https://websharks.org/wp-content/uploads/2016/06/warning-icon.png" cleanUrlLines="true" />
<adHocSlackNotify channel="${_project_slack_channel}" text="*${project_title}*: bleeding edge updated to v${project_version}." attachmentColor="#D25D00" attachmentAuthorIcon="https://websharks.org/wp-content/uploads/2016/06/attachment-icon.png" attachmentAuthorName="Bleeding edge URLs are as follows:" attachmentText="${_uploads_bleeding_edge_finale_urls}" attachmentFooter="Please keep pro software URLs private!" attachmentFooterIcon="https://websharks.org/wp-content/uploads/2016/06/warning-icon.png" cleanUrlLines="true" />
<echo />
</then>
</if>
Expand Down

0 comments on commit 8e6e194

Please sign in to comment.