druidfi/mana

This package is abandoned and no longer maintained. No replacement package was suggested.

Druid build tools

Maintainers

Details

github.com/druidfi/mana

Source

Issues

Installs: 713

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 4

Forks: 0

Open Issues: 0

Type:druid-tool

0.4.3 2018-10-01 05:35 UTC

This package is auto-updated.

Last update: 2020-01-28 12:56:08 UTC


README

Build, artifact and release management for Drupal 7 sites.

Travis CI

This tool builds environment specific Drupal codebase for your Drupal 7 site.

Quick sheet

By requiring this toolset, your project gets following commands exposed:

  • vendor/bin/mana-build creates new build for selected environment to a path (e.g. builds/something)
  • vendor/bin/mana-artifact makes tar artifact of given path
  • vendor/bin/mana-release makes release by symlinking: public > builds/target_build
  • vendor/bin/mana-dev is alias for building development build and releasing it

See detailed instructions below.

How to use in the project

Require with Composer:

$ composer require druidfi/mana 0.4.1

Add following scripts your project's composer.json file:

"scripts": {
    "artifact": [
        "mana-artifact"
    ],
    "build-development": [
        "mana-dev"
    ],
    "build-production": [
        "mana-build production",
        "@release"
    ],
    "build-production": [
        "mana-build testing",
        "@release"
    ],
    "release": [
        "mana-release latest"
    ]
}

If you're project is on Amazee.io, add also this script:

"scripts": {
    "post-update-cmd": [
        "mana-post-update"
    ]
}

Or manually copy vendor/druidfi/mana/dist/Makefile to your project root.

Needed configuration

Put file called release_config.php to your project's conf folder for pre and post hooks (e.g. symlinking).

Exposed commands in the requiring project

When installed to the project via Composer, the following command are exposed to vendor/bin folder.

Create a build

$ vendor/bin/mana-build ENV PATH

ENV=development/production/staging/testing Mandatory

PATH=builds/something Optional, defaults to builds/{date}

Create an artifact (wraps build & artifact commands)

$ vendor/bin/mana-artifact

Create a release (aka symlink public to selected build)

$ vendor/bin/mana-release latest

Create a development build and release

$ vendor/bin/mana-dev

Development and testing

You can also run these commands within this repo:

Create a build

$ bin/mana-dev

Output:

  • builds > path where builds are stored (except for development)
  • public > released build and the path which should be the webroot

Create an artifact

This command creates a tar file from the source specified (public folder by default).

$ bin/mana-artifact production

Source folder can be changed with 2nd attribute: $ bin/mana-artifact production someotherfolder

Output:

  • current.tar.gz > artifact file

Utility commands

  • composer clean will remove files and folders created by build-tool
  • composer test runs PHPUnit tests