2017 © Pedro Peláez
 

library dev-helper-cmds

Useful commands for every Developer

image

eddiejaoude/dev-helper-cmds

Useful commands for every Developer

  • Monday, January 12, 2015
  • by eddiejaoude
  • Repository
  • 1 Watchers
  • 17 Stars
  • 1,799 Installations
  • Makefile
  • 0 Dependents
  • 0 Suggesters
  • 10 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Dev Helper Commands

Gitter, (*1)

Useful commands for every Developer., (*2)

This abstracts the commands required for development., (*3)

For example:, (*4)

If a developer/tester needs to start the webserver, then should **NOT* * care if you are using vagrant or php built-in webserver. They should just run the same command (eg. make dev.server). This way, when updating the architecture, the same commands can be run, even if they are doing something slightly different or more than in an earlier version., (*5)

Usage

  1. Create a Makefile in the root of your project., (*6)

  2. Added a LOCATION parameter to the top of the Makefile, (*7)

LOCATION=.

If you have brought in this Helper Library with composer, then you need to update the location of the include files., (*8)

In your main Makefile update the location parameter:, (*9)

LOCATION=vendor/eddiejaoude/dev-helper-cmds

Note: must NOT end in a /, (*10)

  1. Now include the commands you want to use or include all by adding the following to your Makefile
include $(LOCATION)/include.all
  1. Then you are done.

Below our the built-in commands., (*11)

Overriding commands

You can override these by adding to your Makefile that contains all the includes., (*12)

# ---
# Below is example overwriting commands
# Note: you will get warnings
# ---

symfony.test.spec:
    bin/phpspec run  --config test/phpspec.yml

symfony.test.bdd:
    bin/behat --config test/behat.yml 

Combining commands to make new ones

It is also possible to combine exist or new commands with a new command:, (*13)

new.command: old.cmd1 old.cmd2
    echo NEW CMD

Added Custom commands

  1. Create a directory in your project root .make/, (*14)

  2. Add command files inside new directory .make/log, (*15)

  3. In your Makefile include new custom files with, (*16)

include .make/*

All done!, (*17)


Built-in commands

Git commands

  • make git.status
  • make git.branch branch=build-feature/symfony2-behat-35 (this can be a branch or tag or commit hash)

Composer commands

  • make composer.download
  • make composer.install
    • dependency on composer.download
  • make composer.update
    • dependency on composer.download

Symfony

Built-in Server
  • make symfony.server
Dump logs
  • make symfony.logs
Database
  • make symfony.dev.rebuild runs all the commands below..., (*18)

  • make symfony.dev.db.drop drops the database, (*19)

  • make symfony.dev.db.create creates the database
  • make symfony.dev.db.update updates the database
  • make symfony.dev.db.data loads fixture data into database
Dump & commit assets
  • make build.assets

Example usage / override, add the following to your custom Makefile (or include), (*20)

build.package: build.user build.version build.changelog build.assets build.tag, (*21)

Running tests in parallel using Robo
  • make symfony.test.run
    • dependency on Robo
Running Behat tests
  • make symfony.test.bdd
    • dependency on Behat & SymfonyBehat bundle
Running PHPSpec
  • make symfony.test.spec
    • dependency on PHPSpec
Running PHPUnit
  • symfony.test.unit suite=app

The Versions

12/01 2015

dev-master

9999999-dev

Useful commands for every Developer

  Sources   Download

12/12 2014

0.0.1

0.0.1.0

Useful commands for every Developer

  Sources   Download