Skip to content

Commit

Permalink
Merge pull request #39 from moderntribe/feat/update-wp-to-55
Browse files Browse the repository at this point in the history
Update the WordPress version to 5.5
  • Loading branch information
borkweb authored Aug 17, 2020
2 parents b69a735 + 137b1ef commit 0ab5586
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.3] - 2020-08-13
### Changed

- Update the WordPress version used in the stack to `5.5`.
- Fix handling of default answers in prompts.

## [0.5.2] - 2020-08-10
### Changed

Expand Down
10 changes: 10 additions & 0 deletions src/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ function ask( $question, $default = null ) {
$prompt .= " ({$default})";
}

// Add an empty space after the prompt to separate visual confusion.
$prompt .= ' ';

$is_boolean = false;
if ( is_bool( $default ) || preg_match( '/(^yes|no)$/i', $default ) ) {
// It's a yes or no question, cast to boolean at the end.
Expand All @@ -511,6 +514,13 @@ function ask( $question, $default = null ) {
$value = readline();
}

/*
* If the answer is an empty line, then the user just pressed Enter: use the default value.
*/
if ( $default !== '' ) {
$value = '' === trim( $value ) ? $default : $value;
}

if ( $is_boolean ) {
return preg_match( '/^y/i', $value );
}
Expand Down
2 changes: 1 addition & 1 deletion tric
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $args = args( [
] );

$cli_name = basename( $argv[0] );
const CLI_VERSION = '0.5.2';
const CLI_VERSION = '0.5.3';

$cli_header = implode( ' - ', [
light_cyan( $cli_name ) . ' version ' . light_cyan( CLI_VERSION ),
Expand Down
2 changes: 1 addition & 1 deletion tric-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:

wordpress:
# Fix the version of the WordPress image to avoid issues w/ out-of-date database dumps.
image: wordpress:5.4.1-apache
image: wordpress:5.5-apache
networks:
tric:
# Allow the other containers to read this container with a pretty URL.
Expand Down

0 comments on commit 0ab5586

Please sign in to comment.