symandy/makefile-maker-bundle

Generate Makefile for Symfony application

Installs: 2 381

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

v0.6.0 2022-02-10 11:09 UTC

This package is auto-updated.

Last update: 2024-03-30 00:24:31 UTC


README

Introduction

Symandy Makefile Maker is a Symfony bundle used to generate a Makefile containing Symfony commands shortcuts for a project

This bundle includes some basics commands (Symfony, Doctrine, Composer and more) but project commands can be added to this file.

Installation

composer require --dev symandy/makefile-maker-bundle

If you are not using Symfony Flex, add the following lines to config/bundles.php

<?php

return [
    ...
    Symandy\MakefileMakerBundle\SymandyMakefileMakerBundle::class => ['dev' => true, 'test' => true],
    ...
];

Configuration

You can dump the full configuration by running the following command

php bin/console config:dump-reference SymandyMakefileMakerBundle

You can add symandy_makefile_maker.yaml file under config/packages directory to add additional commands to your Makefile.

symandy_makefile_maker:
  groups:
    your_project:
      commands:
        hello:
          name: hello
          description: Say hello
          instructions:
            - executable: symfony_console
              name: app:hello
              arguments: [John]
              options:
                - { key: last-name, value: Doe }

This configuration will output the following Makefile:

SYMFONY_CONSOLE = /usr/local/bin/symfony console
...

hello: ## Say hello
	@SYMFONY_CONSOLE app:hello John --last-name Doe 

Full configuration can be dumped using:

php bin/console debug:config SymandyMakefileMakerBundle

Usage

You can now run this command by running:

make hello

instead of:

symfony console app:hello John --last-name Doe 

Note

The only purpose of this bundle is to generate a Makefile for a Symfony project. It can be removed if the Makefile won't be updated during development using:

composer remove --dev symandy/makefile-maker-bundle