Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

Latest commit

 

History

History
114 lines (77 loc) · 2.86 KB

README.md

File metadata and controls

114 lines (77 loc) · 2.86 KB

Capistrano::Wearerequired · Gem Version

Capistrano::Wearerequired is a collection of recipes and tasks specialized on WordPress deployment.

Installation

  1. Add this line to your application's Gemfile to install the latest stable version:

    gem 'capistrano-wearerequired', '~> 2.0'
  2. Execute:

    $ bundle
    
  3. Require the library in your application's Capfile:

    require 'capistrano/wearerequired'

Usage

New Messaging Elements for Slackistrano

The class SlackistranoMessagingElements allows to change the icon with an emoji or image URL and to define a custom username.

Example:

set :slackistrano, {
    klass: Capistrano::Wearerequired::SlackistranoMessagingElements,
    channel: '#your-channel',
    webhook: 'your-incoming-webhook-url',
    icon_emoji: ':ship:',
    username: 'deploybot'
}

Colors for Slackistrano

The class SlackistranoMessagingColors adds colors to the deploy messages posted to Slack. SlackistranoMessagingColors extends SlackistranoMessagingElements.

Example:

set :slackistrano, {
    klass: Capistrano::Wearerequired::SlackistranoMessagingColors,
    channel: '#your-channel',
    webhook: 'your-incoming-webhook-url'
}

image

Expanded Git Messaging for Slackistrano

The class SlackistranoExpandedGitMessaging adds a link to the current diff, the current revision and branch, the name of the deployer and suppresses update messages. SlackistranoExpandedGitMessaging extends SlackistranoMessagingColors.

Example:

set :slackistrano, {
    klass: Capistrano::Wearerequired::SlackistranoExpandedGitMessaging,
    channel: '#your-channel',
    webhook: 'your-incoming-webhook-url',
}

image

See Customizing the Messaging for more information.

Additional tasks

To delete all content from Composer's cache directories run:

cap staging composer:clear_cache

To clean up all old releases but the last run:

cap staging deploy:cleanup_all

To install WordPress translations set :wp_language and run:

set :wp_languages, [
	'de_DE',
	'it_IT
]

cap staging wordpress:install_translations

To update WordPress translations run:

cap staging wordpress: update_translations

To clear OPcache of your site set :wp_clear_opcache, true and run:

cap staging wordpress:clear_opcache

(Requires the WP-CLI Clear OPcache plugin.)