Skip to content

Commit

Permalink
Merge pull request #20 from moderntribe/fix/support-more-db-env-vars
Browse files Browse the repository at this point in the history
Support more env db var credentials
  • Loading branch information
lucatume authored Jun 25, 2020
2 parents 3836599 + 1b2b891 commit cc7b9cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
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.4.1] - 2020-06-25

### Changed

- Add support for `DB_` prefixed database credentials and name in the original `.env.*` files.

## [0.4.0] - 2020-06-25
### Added

Expand Down
4 changes: 4 additions & 0 deletions src/scaffold.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function write_tric_env_file( $plugin_path ) {

$replace['wp_db_port'] = [
'env' => [
'DB_PORT',
'WP_DB_PORT',
'TEST_DB_PORT',
'TEST_SITE_DB_PORT',
Expand All @@ -69,6 +70,7 @@ function write_tric_env_file( $plugin_path ) {

$replace['wp_db_host'] = [
'env' => [
'DB_HOST',
'WP_DB_HOST',
'WP_TEST_DB_HOST',
'TEST_DB_HOST',
Expand All @@ -79,6 +81,7 @@ function write_tric_env_file( $plugin_path ) {

$replace['wp_db_name'] = [
'env' => [
'DB_NAME',
'WP_DB_NAME',
'WP_TEST_DB_NAME',
'TEST_DB_NAME',
Expand All @@ -89,6 +92,7 @@ function write_tric_env_file( $plugin_path ) {

$replace['wp_db_password'] = [
'env' => [
'DB_PASSWORD',
'WP_DB_PASSWORD',
'WP_TEST_DB_PASSWORD',
'TEST_DB_PASSWORD',
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.4.0';
const CLI_VERSION = '0.4.1';

$cli_header = implode( ' - ', [
light_cyan( $cli_name ) . ' version ' . light_cyan( CLI_VERSION ),
Expand Down

0 comments on commit cc7b9cd

Please sign in to comment.