2017 © Pedro Peláez
 

library drupal-console-build

Expose new commands to Drupal Console to run builds using a config file.

image

smalot/drupal-console-build

Expose new commands to Drupal Console to run builds using a config file.

  • Thursday, February 23, 2017
  • by smalot
  • Repository
  • 2 Watchers
  • 3 Stars
  • 45 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 45 % Grown

The README.md

Drupal Console Build

Expose new commands to Drupal Console to run builds using a config file., (*1)

Latest Stable Version Latest Unstable Version License composer.lock, (*2)

Total Downloads Monthly Downloads Daily Downloads, (*3)

Setup

Include this library in your Drupal project:, (*4)

composer require "smalot/drupal-console-build:*"

Must be added in your settings.yml file., (*5)

services:
  console.deploy_run:
    class: Smalot\Drupal\Console\Build\Command\RunCommand
    arguments: []
    tags:
      - { name: drupal.command }

  console.deploy_list:
    class: Smalot\Drupal\Console\Build\Command\ListCommand
    arguments: []
    tags:
      - { name: drupal.command }

Sample config file

File: .build.yml should be at the same folder level as the .git/., (*6)

# List stages enabled
stages:
    - compile
    - cache
    - features

# Commands section
compile_css:
    stage: compile
    script:
        - echo "Compile SASS file into CSS"
        - compass build
    allow_failure: true

cache_rebuild:
    stage: cache
    script:
        - echo "Cache Rebuild"
        - cd web && drush cache-rebuild

features_revert:
    stage: features
    script:
        - echo "Features revert all"
        - cd web && drush fra -y
    except:
        - master

Settings

stages allows to group commands and to order them during process. If stages entry is specified, all commands without stage attribute won't be run., (*7)

Both only and except accepts regex patterns (must be surrounded by backslash /). You can't specify only and except at the same time., (*8)

command:
    only:
        - "/^fix-.*$/i"

The allow_failure will report a command in error, but won't stop future commands. Otherwise, the whole build will stop at the first command line error., (*9)

Usage

Run all tasks, (*10)

drupal build:run

Run all tasks of one stage, (*11)

drupal build:run --stage=cache

Run specific tasks, (*12)

drupal build:run compile_css cache_rebuild

The Versions

23/02 2017

dev-master

9999999-dev

Expose new commands to Drupal Console to run builds using a config file.

  Sources   Download

MIT

The Requires

 

plugin console drupal build