yiisoft / yii-dev-tool

Development environment for Yii 3 packages
https://www.yiiframework.com/
68 stars 36 forks source link

Group some commands and add aliases #143

Open rugabarbo opened 3 years ago

rugabarbo commented 3 years ago

Current state

Now the commands look like this:

20 12 07-14 19 45

Proposal

  1. Group ungrouped commands.
  2. Create aliases for frequently used commands.

Plan

1) Group commands (rename):

2) Create aliases:

Command Alias How call will look
composer/fix-dependencies
git/checkout-branch co ./yii-dev co master yii-demo,db,arrays
git/commit c ./yii-dev c "Add ability to use feature X" yii-demo,db,arrays
git/pr/create pr ./yii-dev pr "My first yii3 PR" yii-demo,db,arrays
git/pull pull ./yii-dev pull yii-demo,db,arrays
git/push push ./yii-dev push yii-demo,db,arrays
git/status ss ./yii-dev ss yii-demo,db,arrays
github/settings
release/make
package/install
package/lint lint ./yii-dev lint yii-demo,db,arrays
release/make
package/test test ./yii-dev test yii-demo,db,arrays
package/update upd ./yii-dev upd yii-demo,db,arrays
replicate/composer-config
replicate/copy-file
replicate/files
travis/ensure-cronjob
travis/update-slack-config
shell/exec
rugabarbo commented 3 years ago

We can also create a script with a short name in the root. For example, "./t" - the first letter of the word "tool" is used.

Then the call to PR command will look like this: ./t pr "My first yii3 PR" yii-demo,db,arrays

Now it looks like this: ./yii-dev git/pr/create "My first yii3 PR" yii-demo,db,arrays

samdark commented 3 years ago

I am unable to remember one or two letter aliases such as c, co, ss.

I'd propose:

Command Alias How call will look
composer/fix-dependencies
git/checkout-branch checkout ./yii-dev checkout master yii-demo,db,arrays
git/commit commit ./yii-dev commit "Add ability to use feature X" yii-demo,db,arrays
git/pr/create pr ./yii-dev pr "My first yii3 PR" yii-demo,db,arrays
git/pull pull ./yii-dev pull yii-demo,db,arrays
git/push push ./yii-dev push yii-demo,db,arrays
git/status status ./yii-dev status yii-demo,db,arrays
github/settings
release/make
package/install install ./yii-dev install yii-demo,db,arrays
package/lint lint ./yii-dev lint yii-demo,db,arrays
package/test test ./yii-dev test yii-demo,db,arrays
package/update update ./yii-dev update yii-demo,db,arrays
replicate/composer-config
replicate/copy-file
replicate/files
travis/ensure-cronjob
travis/update-slack-config
shell/exec exec ./yii-dev exec "ls -l"
samdark commented 3 years ago

btw., we can remove travis* now. We've mostly switched to GitHub actions.

samdark commented 3 years ago

git/pr/create should likely be grouped into github/pr.

samdark commented 3 years ago

Partially fixed.