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

Update the WordPress version to 5.5 #39

Merged
merged 2 commits into from
Aug 17, 2020
Merged
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
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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

10 changes: 10 additions & 0 deletions src/utils.php
Original file line number Diff line number Diff line change
@@ -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.
@@ -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 );
}
2 changes: 1 addition & 1 deletion tric
Original file line number Diff line number Diff line change
@@ -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 ),
2 changes: 1 addition & 1 deletion tric-stack.yml
Original file line number Diff line number Diff line change
@@ -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.