Repository is archived
No commit activity in last 3 years
No release in over 3 years
Capistrano::Wearerequired is a collection of recipes and tasks specialized on WordPress deployment.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 12.3.3

Runtime

 Project Readme

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.)