Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for running a command within a project directory #101

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

jrmd
Copy link
Member

@jrmd jrmd commented Nov 13, 2023

Description

This PR adds support for the cmd command, which adds the ability to run a command across selected projects within a directory. This can be useful to allow the cli to run repetitive tasks across all project paths. The command also has an alias of run so within the description anywhere that cmd it can be replaced with run. Fixes #112

build-tools cmd [projects] [--quiet] [--continueOnFail] -- <command>

e.g running composer install across all projects

build-tools cmd -- composer install

Options

--quiet

Alias: q
This option stops the command from output to stdout

--continueOnFail

Alias: F
This option will continue running the command even if one fails, however will still return and exit(1) code on any failure.


example of running composer in specific folders

build-tools cmd project_one,plugin_two -- composer install

Unfortunately due to what seems like a parsing issue with yargs if you are using - args in the command you have to wrap the command in quotes

build-tools cmd -Fq -- "composer install -vvv"

Change Log

  • Add support for running commands across project paths
  • Add support for commands running in specific projects
  • Add run alias for cmd

@jrmd jrmd marked this pull request as ready for review November 13, 2023 13:58
@jrmd jrmd self-assigned this Nov 13, 2023
@jrmd jrmd added the enhancement New feature or request label Nov 13, 2023
@ampersarnie ampersarnie added this to the v1.4 milestone Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

[Feature]: Add support for running commands within each project directory.
2 participants