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

Improve README.md templates #197

Merged
merged 3 commits into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/ScaffoldPackageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ public function package_readme( $args, $assoc_args ) {
$readme_args['shields'] = implode( ' ', $composer_obj['extra']['readme']['shields'] );
} else {
$shields = [];
if ( file_exists( $package_dir . '/.github/workflows/testing.yml' ) ) {
$shields[] = "[![Testing](https://github.com/{$readme_args['package_name']}/actions/workflows/testing.yml/badge.svg)](https://github.com/{$readme_args['package_name']}/actions/workflows/testing.yml)";
}
if ( file_exists( $package_dir . '/.travis.yml' ) ) {
$shields[] = "[![Build Status](https://travis-ci.org/{$readme_args['package_name']}.svg?branch=master)](https://travis-ci.org/{$readme_args['package_name']})";
}
Expand Down
12 changes: 10 additions & 2 deletions templates/readme-installing.mustache
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Installing this package {{wp_cli_requires_instructions}}. Update to {{wp_cli_update_to_instructions}}.

Once you've done so, you can install this package with:
Once you've done so, you can install the latest stable version of this package with:

wp package install git@github.com:{{package_name}}.git
```bash
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
```
2 changes: 1 addition & 1 deletion templates/readme-support.mustache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Github issues aren't for general support questions, but there are other venues you can try: https://wp-cli.org/#support
GitHub issues aren't for general support questions, but there are other venues you can try: https://wp-cli.org/#support