From f89b88e0220111ec9547ac6d017c4f14f4d7cf73 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Sat, 4 Nov 2023 07:42:48 -0700 Subject: [PATCH 1/2] Update README to provide a better explanation of setting up --- .readme-partials/DEVELOPMENT.md | 8 +++++++- .readme-partials/INSTALLATION.md | 26 +++++++++++++++++-------- README.md | 33 ++++++++++++++++++++++++-------- 3 files changed, 50 insertions(+), 17 deletions(-) diff --git a/.readme-partials/DEVELOPMENT.md b/.readme-partials/DEVELOPMENT.md index e8d20ce..817d609 100644 --- a/.readme-partials/DEVELOPMENT.md +++ b/.readme-partials/DEVELOPMENT.md @@ -1,4 +1,10 @@ Every subfolder is a proper clone of the corresponding GitHub repository. This means that you can create new branches, make your changes, commit to the new branch and then submit as pull-request, all from within these folders. -As the folders are also symlinked into the Composer `vendor` folder, you will always have the latest changes available when running WP-CLI through the `vendor/bin/wp` executable. +Unless you have commit access to the repository, you'll need to fork the repository in order to push your feature branch. [GitHub's CLI](https://github.com/cli/cli) is pretty helpful for this: + +```bash +cd core-command +gh repo fork +``` +As the folders are also symlinked into the Composer `vendor` folder, you will always have the latest changes available when running WP-CLI through the `vendor/bin/wp` executable. diff --git a/.readme-partials/INSTALLATION.md b/.readme-partials/INSTALLATION.md index d66811a..a141de0 100644 --- a/.readme-partials/INSTALLATION.md +++ b/.readme-partials/INSTALLATION.md @@ -1,13 +1,23 @@ -Clone this repository onto your hard drive and then use Composer to install all dependencies: +If you normally use WP-CLI on your web host or via Brew, you're most likely using the Phar executable (`wp-cli.phar`). This Phar executable file is the "built", singular version of WP-CLI. It is compiled from a couple dozen repositories in the WP-CLI GitHub organization. -``` -git clone https://github.com/wp-cli/wp-cli-dev -cd wp-cli-dev -composer install -``` - -This will: +In order to make code changes to WP-CLI, you'll need to set up this `wp-cli-dev` development environment on your local machine. The setup process will: 1. Clone all relevant packages from the `wp-cli` GitHub organization into the `wp-cli-dev` folder, and 2. Install all Composer dependencies for a complete `wp-cli-bundle` setup, while symlinking all of the previously cloned packages into the Composer `vendor` folder. 3. Symlink all folder in `vendor` into corresponding `vendor` folders in each repository, thus making the centralized functionality based on Composer available in each repository subfolder. + +First, clone the GitHub repository: + +```bash +git clone https://github.com/wp-cli/wp-cli-dev wp-cli-dev +``` + +Before you can proceed further, you'll need to make sure you have [Composer](https://getcomposer.org/), PHP, and a functioning MySQL or MariaDB server on your local machine too. + +Once those prequisites are met, finish the installation process: + +```bash +cd wp-cli-dev +composer install +composer prepare-tests +``` diff --git a/README.md b/README.md index 47da595..1b00100 100644 --- a/README.md +++ b/README.md @@ -11,24 +11,41 @@ Quick links: [Installation](#installation) | [Development](#development) | [Usin ## Installation -Clone this repository onto your hard drive and then use Composer to install all dependencies: +If you normally use WP-CLI on your web host or via Brew, you're most likely using the Phar executable (`wp-cli.phar`). This Phar executable file is the "built", singular version of WP-CLI. It is compiled from a couple dozen repositories in the WP-CLI GitHub organization. -``` -git clone https://github.com/wp-cli/wp-cli-dev -cd wp-cli-dev -composer install -``` - -This will: +In order to make code changes to WP-CLI, you'll need to set up this `wp-cli-dev` development environment on your local machine. The setup process will: 1. Clone all relevant packages from the `wp-cli` GitHub organization into the `wp-cli-dev` folder, and 2. Install all Composer dependencies for a complete `wp-cli-bundle` setup, while symlinking all of the previously cloned packages into the Composer `vendor` folder. 3. Symlink all folder in `vendor` into corresponding `vendor` folders in each repository, thus making the centralized functionality based on Composer available in each repository subfolder. +First, clone the GitHub repository: + +```bash +git clone https://github.com/wp-cli/wp-cli-dev wp-cli-dev +``` + +Before you can proceed further, you'll need to make sure you have [Composer](https://getcomposer.org/), PHP, and a functioning MySQL or MariaDB server on your local machine too. + +Once those prequisites are met, finish the installation process: + +```bash +cd wp-cli-dev +composer install +composer prepare-tests +``` + ## Development Every subfolder is a proper clone of the corresponding GitHub repository. This means that you can create new branches, make your changes, commit to the new branch and then submit as pull-request, all from within these folders. +Unless you have commit access to the repository, you'll need to fork the repository in order to push your feature branch. [GitHub's CLI](https://github.com/cli/cli) is pretty helpful for this: + +```bash +cd core-command +gh repo fork +``` + As the folders are also symlinked into the Composer `vendor` folder, you will always have the latest changes available when running WP-CLI through the `vendor/bin/wp` executable. ## Using From 056411eabf802b73d7bc409d2b991a2c6c2a28f7 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Mon, 6 Nov 2023 14:03:50 -0800 Subject: [PATCH 2/2] Consolidate installation execution steps --- .readme-partials/INSTALLATION.md | 11 +++-------- README.md | 11 +++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.readme-partials/INSTALLATION.md b/.readme-partials/INSTALLATION.md index a141de0..d4d062e 100644 --- a/.readme-partials/INSTALLATION.md +++ b/.readme-partials/INSTALLATION.md @@ -6,17 +6,12 @@ In order to make code changes to WP-CLI, you'll need to set up this `wp-cli-dev` 2. Install all Composer dependencies for a complete `wp-cli-bundle` setup, while symlinking all of the previously cloned packages into the Composer `vendor` folder. 3. Symlink all folder in `vendor` into corresponding `vendor` folders in each repository, thus making the centralized functionality based on Composer available in each repository subfolder. -First, clone the GitHub repository: +Before you can proceed further, you'll need to make sure you have [Composer](https://getcomposer.org/), PHP, and a functioning MySQL or MariaDB server on your local machine. -```bash -git clone https://github.com/wp-cli/wp-cli-dev wp-cli-dev -``` - -Before you can proceed further, you'll need to make sure you have [Composer](https://getcomposer.org/), PHP, and a functioning MySQL or MariaDB server on your local machine too. - -Once those prequisites are met, finish the installation process: +Once the prequisites are met, clone the GitHub repository and run the installation process: ```bash +git clone https://github.com/wp-cli/wp-cli-dev wp-cli-dev cd wp-cli-dev composer install composer prepare-tests diff --git a/README.md b/README.md index 1b00100..5e9df3f 100644 --- a/README.md +++ b/README.md @@ -19,17 +19,12 @@ In order to make code changes to WP-CLI, you'll need to set up this `wp-cli-dev` 2. Install all Composer dependencies for a complete `wp-cli-bundle` setup, while symlinking all of the previously cloned packages into the Composer `vendor` folder. 3. Symlink all folder in `vendor` into corresponding `vendor` folders in each repository, thus making the centralized functionality based on Composer available in each repository subfolder. -First, clone the GitHub repository: +Before you can proceed further, you'll need to make sure you have [Composer](https://getcomposer.org/), PHP, and a functioning MySQL or MariaDB server on your local machine. -```bash -git clone https://github.com/wp-cli/wp-cli-dev wp-cli-dev -``` - -Before you can proceed further, you'll need to make sure you have [Composer](https://getcomposer.org/), PHP, and a functioning MySQL or MariaDB server on your local machine too. - -Once those prequisites are met, finish the installation process: +Once the prequisites are met, clone the GitHub repository and run the installation process: ```bash +git clone https://github.com/wp-cli/wp-cli-dev wp-cli-dev cd wp-cli-dev composer install composer prepare-tests