mirror of
https://ghproxy.net/https://github.com/wp-cli/scaffold-package-command.git
synced 2025-08-20 22:57:27 +08:00
Use a dynamic branch name in the README
This commit is contained in:
parent
b923d846aa
commit
dd2ec1e783
3 changed files with 6 additions and 1 deletions
|
@ -50,6 +50,10 @@ Feature: Scaffold a README.md file for an existing package
|
|||
"""
|
||||
*This README.md is generated dynamically from the project's codebase
|
||||
"""
|
||||
And the {PACKAGE_PATH}/local/wp-cli/default-readme/README.md file should contain:
|
||||
"""
|
||||
wp package install wp-cli/default-readme:dev-master
|
||||
"""
|
||||
When I run `wp package uninstall wp-cli/default-readme`
|
||||
Then STDOUT should contain:
|
||||
"""
|
||||
|
|
|
@ -259,6 +259,7 @@ EOT;
|
|||
'package_short_name' => $bits[1],
|
||||
'package_name_border' => str_pad( '', strlen( $composer_obj['name'] ), '=' ),
|
||||
'package_description' => isset( $composer_obj['description'] ) ? $composer_obj['description'] : '',
|
||||
'branch' => $branch,
|
||||
'required_wp_cli_version' => ! empty( $composer_obj['require']['wp-cli/wp-cli'] ) ? str_replace( [ '~', '^', '>=' ], 'v', $composer_obj['require']['wp-cli/wp-cli'] ) : 'v1.3.0',
|
||||
'shields' => '',
|
||||
'has_commands' => false,
|
||||
|
|
|
@ -9,5 +9,5 @@ wp package install {{package_name}}:@stable
|
|||
To install the latest development version of this package, use the following command instead:
|
||||
|
||||
```bash
|
||||
wp package install {{package_name}}:dev-master
|
||||
wp package install {{package_name}}:dev-{{branch}}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue