Skip to content
This repository has been archived by the owner on Dec 14, 2019. It is now read-only.

Commit

Permalink
Merge pull request #155 from Pageworks/develop
Browse files Browse the repository at this point in the history
Fixing outstanding merge conflicts & requires developers email address
  • Loading branch information
Kyle Andrews committed May 14, 2019
2 parents d2a6768 + 86980d5 commit 34a20e6
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .env.example
Expand Up @@ -45,3 +45,6 @@ SYSTEM_EMAIL_ADDRESS="REPLACE_ME"

# System Email Name
SYSTEM_EMAIL_NAME="REPLACE_ME"

# Testing Email Adress
TEST_EMAIL_ADDRESS="REPLACE_ME"
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,13 @@
## 0.1.3.2 - 2019-05-14

## Added

- Adds: setup script requires the developers email address and sets it as the `testToEmailAddress` in `general.php`

## Fixed

- Fixes: outstanding merge conflict issue from the previous release

## 0.1.3.1 - 2019-05-14

### Added
Expand Down
22 changes: 19 additions & 3 deletions build-tools/setup/questions.js
Expand Up @@ -24,7 +24,7 @@ module.exports = {
name: 'defaultUrl',
type: 'input',
message: 'Site URL:',
default: `${ projectName.replace(' ', '-').toLowerCase() }.local`,
default: `${ projectName.replace(/\s/g, '-').toLowerCase() }.local`,
validate: (input)=>{
if(input !== ''){
if(input.match(/http:\/\//)){
Expand All @@ -35,6 +35,22 @@ module.exports = {
}
return 'Please enter a project URL.';
}
},
{
name: 'devEmailAddress',
type: 'input',
message: 'Your Email Address:',
default: `web@page.works`,
validate: (input)=>{
if(input !== ''){
if(input.match(/.+@.+\..+/)){
return 'Please provide a valid email address.';
}else{
return true;
}
}
return 'Please enter your email address.';
}
}
];

Expand Down Expand Up @@ -96,7 +112,7 @@ module.exports = {
name: 'database',
type: 'input',
message: 'Database name:',
default: `craft_${ projectName.replace(' ', '-').toLowerCase() }`,
default: `craft_${ projectName.replace(/\s/g, '-').toLowerCase() }`,
validate: (input)=>{
if(input !== ''){
return true;
Expand All @@ -108,4 +124,4 @@ module.exports = {

return inquirer.prompt(questions);
}
}
}
2 changes: 2 additions & 0 deletions build-tools/setup/setup.js
Expand Up @@ -28,6 +28,7 @@ askQuestions = (async ()=>{

const question2 = await questions.getProjectURL(projectDetails.projectName);
projectDetails.devUrl = `${ question2.defaultUrl }`;
projectDetails.devEmail = devEmailAddress;

const question3 = await questions.getDatabaseDetails(projectDetails.projectName);
projectDetails.driver = question3.driver;
Expand Down Expand Up @@ -80,6 +81,7 @@ askQuestions = (async ()=>{
modifiedFile = modifiedFile.replace(/SYSTEM_NAME="REPLACE_ME"/, `SYSTEM_NAME="${ projectDetails.projectName }"`);
modifiedFile = modifiedFile.replace(/SYSTEM_EMAIL_NAME="REPLACE_ME"/, `SYSTEM_EMAIL_NAME="${ projectDetails.projectName }"`);
modifiedFile = modifiedFile.replace(/SYSTEM_EMAIL_ADDRESS="REPLACE_ME"/, `SYSTEM_EMAIL_ADDRESS="no-reply@${ projectDetails.devUrl }"`);
modifiedFile = modifiedFile.replace(/TEST_EMAIL_ADDRESS="REPLACE_ME"/, `TEST_EMAIL_ADDRESS="${ projectDetails.devEmail }"`);

fs.writeFile('.env', modifiedFile, (err)=>{
if(err){
Expand Down
11 changes: 3 additions & 8 deletions config/general.php
Expand Up @@ -26,13 +26,8 @@
'useProjectConfigFile' => true,

// Leave at bottom of global settings
<<<<<<< HEAD
'jsCacheBustTimestamp' => '53210445',
'cssCacheBustTimestamp' => '53211169',
=======
'jsCacheBustTimestamp' => '53210445',
'cssCacheBustTimestamp' => '53211169',
>>>>>>> develop
'jsCacheBustTimestamp' => '54654843',
'cssCacheBustTimestamp' => '54655693',
],

// Dev environment settings
Expand All @@ -41,7 +36,7 @@
'siteUrl' => getenv('DEV_URL'),
'allowUpdates' => true,
'devMode' => true,
'testToEmailAddress' => 'REPLACE_ME',
'testToEmailAddress' => getenv('TEST_EMAIL_ADDRESS'),
'enableTemplateCaching' => false,
'aliases' => [
'@rootUrl' => getenv('DEV_URL'),
Expand Down

0 comments on commit 34a20e6

Please sign in to comment.