deltasystems/delta-cli

There is no license information available for the latest version (3.48.1) of this package.

3.48.1 2019-10-16 17:16 UTC

This package is auto-updated.

Last update: 2024-04-25 05:15:57 UTC


README

Command-line tools used at Delta Systems for common development workflow needs.

Delta CLI is an open source project started to improve development workflows at Delta Systems. Before Delta CLI, each project had its own ad-hoc shell scripts, Phing configuration files, git hooks, etc. When switching between projects, developers would have to learn the particular idiosyncracies of that project's deployment scripts. Beyond that, these scripts were typically written without robust error handling, logging or notifications. Delta CLI scripts have a handful of important properties that address these issues.

Documentation

http://dev.deltasys.com/

Video Tutorials

  1. Original Intro to the Delta-CLI Project https://youtu.be/lm4iAuW4sIk
  2. Working with remote dev environments in Delta-CLI https://youtu.be/QlSR8enp_Cg
  3. Installing Delta CLI Tools using composer https://youtu.be/JTM429G2fps
  4. In Delta CLI 2.0 we added logging and Slack notifications https://youtu.be/Va_1Tsx5FFk
  5. Delta CLI v3.27.0 New Feature Update 2017-01-05 https://youtu.be/5I_fq9yEl1A
  6. Delta-CLI: Custom Scripts Walkthrough https://youtu.be/Nmkc_AIHe_g

Development

After cloning the repository, install dependencies with Composer, as in the following example:

$ git clone git@github.com:DeltaSystems/delta-cli-tools.git
$ cd delta-cli-tools
$ composer install

Test Suite

Testing is facilitated by PHPUnit, and the test suite can be executed as in the following example that is run within the root directory of the project and enables inspection of the results with less:

$ vendor/bin/phpunit --bootstrap 'tests/bootstrap.php' tests/ &>phpunit.out ; less phpunit.out

You will need to run composer install in order to pass all tests.

Docker / Windows Support

For Windows users (or any OS), there is a Docker environment and commands available to run Delta CLI from your environment.

To get started, you need to have Docker installed, with both the docker and docker-compose commands available. You also need to make sure that your source files are shared for mounting and that you are signed into the Docker Store. It is also necessary to add the ./bin-docker folder to your local OS PATH variable to access the docker commands once installed (even in a global installation). Once those are prerequisites are met, simply execute delta in your Windows environment.

delta-docker

On Windows, delta-docker executes delta-docker.bat which passes through to delta-docker.ps1, a specialised script that uses docker run to execute your delta-cli commands.

Note: when you first execute delta on Windows it will init a build of the delta-cli docker container. Subsequent runs won't have this overhead.

PHP Storm

To enable code inspections in PHPStorm, in the PHP section of Languages & Frameworks settings add ~/.composer/vendor to your include paths