Skip to content

Commit

Permalink
Merge pull request #341 from studiopress/develop
Browse files Browse the repository at this point in the history
Merge 3.3.0 to Master
  • Loading branch information
dreamwhisper authored Apr 6, 2020
2 parents 2b002b5 + 5335da9 commit 1c1e281
Show file tree
Hide file tree
Showing 16 changed files with 406 additions and 137 deletions.
171 changes: 162 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,175 @@
version: 2.1
jobs:
standards:

commands:
install_dependencies:
description: "Install development dependencies."
steps:
- run: composer install
- run: npm ci
mkdir_artifacts:
description: "Make Artifacts directory"
steps:
- run:
command: |
[ ! -d "/tmp/artifacts" ] && mkdir /tmp/artifacts &>/dev/null
executors:
base:
docker:
- image: circleci/buildpack-deps:latest
working_directory: /tmp
php_node:
docker:
- image: circleci/php:7.3.3-stretch-node-browsers
working_directory: /tmp/theme
python:
docker:
- image: circleci/python:3.7-stretch
working_directory: /tmp

jobs:
checkout:
executor: base
steps:
- checkout:
path: theme
- persist_to_workspace:
root: /tmp
paths:
- theme

standards:
executor: php_node
steps:
- checkout
- install-dependencies
- attach_workspace:
at: /tmp
- install_dependencies
- run: composer phpcs
- run: npm run lint:css
- run: npm run lint:js
commands:
install-dependencies:
description: "Install development dependencies."

bundle:
executor: php_node
steps:
- run: composer install
- attach_workspace:
at: /tmp
- run: npm ci
- run: npm run zip
- mkdir_artifacts
- run: mv ./*.zip /tmp/artifacts/.
- persist_to_workspace:
root: /tmp
paths:
- artifacts
- theme
- store_artifacts:
path: /tmp/artifacts/

create_data_file:
executor: php_node
steps:
- attach_workspace:
at: /tmp
- run: npm run prep:piservice /tmp/artifacts
- persist_to_workspace:
root: /tmp
paths:
- artifacts

deploy_s3:
executor: python
steps:
- attach_workspace:
at: /tmp
- aws-s3/sync:
from: "/tmp/artifacts/"
to: "s3://update.atomicblocks.com/themes/${S3_PATH}/"

deploy_sp_staging:
executor: python
steps:
- add_ssh_keys:
fingerprints:
- "f2:c5:53:4d:39:eb:ba:72:06:4d:fc:48:7c:5a:0f:df"
- attach_workspace:
at: /tmp
- run:
command: |
ARTIFACT_FILE=find /tmp/artifacts -type f -name *.zip -printf "%f\n"
DEST_PATH=home/wpe-user/sites/${STAGING_INSTALL_NAME}/wp-content/uploads/member-access/${ARTIFACT_FILE}
DEST_HOST=${STAGING_INSTALL_NAME}@${STAGING_INSTALL_NAME}.ssh.wpengine.net
scp /tmp/artifacts/${ARTIFACT_FILE} ${DEST_HOST}/${DEST_PATH}
deploy_sp_prod:
executor: python
steps:
- add_ssh_keys:
fingerprints:
- "f2:c5:53:4d:39:eb:ba:72:06:4d:fc:48:7c:5a:0f:df"
- attach_workspace:
at: /tmp
- run:
command: |
ARTIFACT_FILE=find /tmp/artifacts -type f -name *.zip -printf "%f\n"
DEST_PATH=home/wpe-user/sites/${PROD_INSTALL_NAME}/wp-content/uploads/member-access/${ARTIFACT_FILE}
DEST_HOST=${PROD_INSTALL_NAME}@${PROD_INSTALL_NAME}.ssh.wpengine.net
scp /tmp/artifacts/${ARTIFACT_FILE} ${DEST_HOST}/${DEST_PATH}
workflows:
version: 2
check-standards:
jobs:
- standards
- checkout:
filters:
tags:
only: /.*/
- standards:
filters:
tags:
only: /.*/
requires:
- checkout
- bundle:
requires:
- standards
filters:
tags:
only: /.*/
branches:
only: master
- create_data_file:
requires:
- bundle
filters:
tags:
only: /.*/
branches:
only: master
- deploy_s3:
requires:
- create_data_file
filters:
tags:
only: /.*/
branches:
only: master
- deploy_sp_staging:
requires:
- create_data_file
filters:
tags:
only: /.*/
branches:
only: master
- deploy_sp_prod:
requires:
- create_data_file
- deploy_sp_staging
filters:
tags:
only: /.*/
branches:
only: master

orbs:
aws-s3: circleci/aws-s3@1.0.0
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ indent_style = tab

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_style = space
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
/phpcs.xml
node_modules/
vendor/

# Artifacts
process.yml
*.zip
*.*.json
59 changes: 59 additions & 0 deletions .scripts/makePIServiceData.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env node
/**
* Create a JSON file to be consumed by the Product Info Service
*
* @TODO Accept a destination file path via CLI arguments
* @TODO Maybe convert "tags" value to an array?
*/
const fs = require('fs');

/**
* Run the script
*/
const runScript = function() {
// Set the destination path
const destPath = getDestPath(process.argv[2]);

// Declare empty data object
let data = {};

// Get array of "theme" keys from process.env.npm_package_theme_*
const keys = Object.keys(process.env).filter(key => key.match(/npm_package_theme_.+/));

// Iterate through keys and populate the data object
// Note: this isn't using a map because we want the output to be an object, not an array
keys.forEach(envKey => {
key = envKey.match(/npm_package_theme_(.+)/)[1]; // strip npm_package_theme_ from key
data[key] = process.env[envKey]; // Save to data object
});

// Write data object to a JSON file
const filePath = `${destPath}/${data.textdomain}.${data.version}.json`;
fs.writeFileSync(filePath, JSON.stringify(data));
}

/**
* Get destination path
*
* @param {string} path
*
* @return {string}
*/
const getDestPath = function(path) {
const defaultPath = process.cwd();

// Return default if a path wasn't provided
if( ! path || ! path.length){
return defaultPath;
}

// Return default if the provided path doesn't exist
if (!fs.existsSync(path)) {
return defaultPath;
}

return path;
}

// Run the script
runScript();
21 changes: 18 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Genesis Sample Theme Changelog

## [3.3.0] - 2020-04-07
Requires WordPress 5.4 or higher.

### Added
* CSS to adjust left padding for WordPress 5.4 Social Icons.
* Editor styles to ensure theme colors work for inline text colors.
* Editor styles for WordPress 5.4 compatibility, including link color, buttons, headings, and lists.

### Changed
* Updated one-click theme setup content to include WordPress 5.4 button markup.
* Update developer dependencies. ([GitHub version](https://github.com/studiopress/genesis-sample/) only.)

### Removed
* Unused `light` heading class.

## [3.2.0] - 2019-11-13

### Added
Expand All @@ -17,7 +32,7 @@
* CSS for tables for better consistency between editor and front end and to allow for new WordPress 5.3 settings.
* Allow footer widgets to be displayed on the landing page template.
* Set imported landing page meta to hide footer widgets. Requires Genesis 3.2 or higher.
* Update homepage content import to use Atomic Blocks Adanced Columns block.
* Update homepage content import to use Atomic Blocks Advanced Columns block.
* Update the phpcs config to exclude a PHP short array rule intended only for WordPress core.

### Fixed
Expand Down Expand Up @@ -87,7 +102,7 @@ Requires Genesis 2.10.0+.
* Changed: improve editor button block styling.
* Changed: clarify wording of Customizer color labels.
* Changed: remove matchHeight script and use CSS flex instead to match heights of WooCommerce product lists.
* Fixed: WooCommmerce shop pages now use the selected page layout instead of the default site layout on sites using object caching.
* Fixed: WooCommerce shop pages now use the selected page layout instead of the default site layout on sites using object caching.
* Fixed: update the `npm run zip` script to prevent an issue with zip decompression for apps such as Path Finder. (npm scripts are available in the version of Genesis Sample on GitHub: https://github.com/studiopress/genesis-sample/).

## [2.9.1] - 2019-03-19
Expand Down Expand Up @@ -179,7 +194,7 @@ Requires Genesis 2.8.0+.
* Update to normalize.css 4.1.1.

## [2.2.3] - 2016-05-18
* Add accessibile mobile menu.
* Add accessible mobile menu.
* Add accessibility support for the 404 Page.
* Add the custom header option to upload your own logo.
* Add customizer option for primary color.
Expand Down
18 changes: 11 additions & 7 deletions config/import/content/block-examples.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,17 @@
<h2 style="text-align:left">Buttons</h2>
<!-- /wp:heading -->
<!-- wp:button {"align":"center"} -->
<div class="wp-block-button aligncenter"><a class="wp-block-button__link" href="#">Button<br></a></div>
<!-- /wp:button -->
<!-- wp:button {"align":"center","className":"is-style-outline"} -->
<div class="wp-block-button aligncenter is-style-outline"><a class="wp-block-button__link" href="#">Outlined Button<br></a></div>
<!-- /wp:button -->
<!-- wp:buttons {"align":"center"} -->
<div class="wp-block-buttons aligncenter"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link" href="#">Button</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->
<!-- wp:buttons {"align":"center"} -->
<div class="wp-block-buttons aligncenter"><!-- wp:button {"className":"is-style-outline"} -->
<div class="wp-block-button is-style-outline"><a class="wp-block-button__link" href="#">Outlined Button</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->
<!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator is-style-wide"/>
Expand Down
16 changes: 10 additions & 6 deletions config/import/content/home-black-white.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
<p>All the resources, training, and support you need to run your dream online business! </p>
<!-- /wp:paragraph -->
<!-- wp:button {"textColor":"light-gray","className":"is-style-default"} -->
<div class="wp-block-button is-style-default"><a class="wp-block-button__link has-text-color has-light-gray-color" href="#">Learn More</a></div>
<!-- /wp:button --></div></div>
<!-- wp:buttons {"align":"left"} -->
<div class="wp-block-buttons alignleft"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link" href="#">Learn More</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div></div>
<!-- /wp:media-text -->
<!-- wp:atomic-blocks/ab-container {"containerPaddingTop":4.5,"containerPaddingRight":0,"containerPaddingBottom":0,"containerPaddingLeft":0,"containerMarginTop":0,"containerMarginBottom":0,"containerWidth":"full","containerBackgroundColor":"#333"} -->
Expand Down Expand Up @@ -81,9 +83,11 @@
<!-- /wp:atomic-blocks/ab-column -->
<!-- wp:atomic-blocks/ab-column -->
<div class="wp-block-atomic-blocks-ab-column ab-block-layout-column"><div class="ab-block-layout-column-inner"><!-- wp:button {"customTextColor":"#ffffff","borderRadius":0,"align":"right","className":"is-style-outline home-contact"} -->
<div class="wp-block-button alignright is-style-outline home-contact"><a class="wp-block-button__link has-text-color no-border-radius" href="/contact" style="color:#ffffff">Get in touch</a></div>
<!-- /wp:button --></div></div>
<div class="wp-block-atomic-blocks-ab-column ab-block-layout-column"><div class="ab-block-layout-column-inner"><!-- wp:buttons {"align":"right"} -->
<div class="wp-block-buttons alignright"><!-- wp:button {"customTextColor":"#ffffff","borderRadius":0,"className":"is-style-outline"} -->
<div class="wp-block-button is-style-outline"><a class="wp-block-button__link has-text-color no-border-radius" href="#" style="color:#ffffff">Get in touch</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div></div>
<!-- /wp:atomic-blocks/ab-column --></div></div>
<!-- /wp:atomic-blocks/ab-columns -->
Expand Down
16 changes: 10 additions & 6 deletions config/import/content/home-color.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
<p>All the resources, training, and support you need to run your dream online business! </p>
<!-- /wp:paragraph -->
<!-- wp:button {"textColor":"light-gray","className":"is-style-default"} -->
<div class="wp-block-button is-style-default"><a class="wp-block-button__link has-text-color has-light-gray-color" href="#">Learn More</a></div>
<!-- /wp:button --></div></div>
<!-- wp:buttons {"align":"left"} -->
<div class="wp-block-buttons alignleft"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link" href="#">Learn More</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div></div>
<!-- /wp:media-text -->
<!-- wp:atomic-blocks/ab-container {"containerPaddingTop":4.5,"containerPaddingRight":0,"containerPaddingBottom":0,"containerPaddingLeft":0,"containerMarginTop":0,"containerMarginBottom":0,"containerWidth":"full","containerBackgroundColor":"#111111"} -->
Expand Down Expand Up @@ -81,9 +83,11 @@
<!-- /wp:atomic-blocks/ab-column -->
<!-- wp:atomic-blocks/ab-column -->
<div class="wp-block-atomic-blocks-ab-column ab-block-layout-column"><div class="ab-block-layout-column-inner"><!-- wp:button {"customTextColor":"#ffffff","borderRadius":0,"align":"right","className":"is-style-outline home-contact"} -->
<div class="wp-block-button alignright is-style-outline home-contact"><a class="wp-block-button__link has-text-color no-border-radius" href="/contact" style="color:#ffffff">Get in touch</a></div>
<!-- /wp:button --></div></div>
<div class="wp-block-atomic-blocks-ab-column ab-block-layout-column"><div class="ab-block-layout-column-inner"><!-- wp:buttons {"align":"right"} -->
<div class="wp-block-buttons alignright"><!-- wp:button {"customTextColor":"#ffffff","borderRadius":0,"className":"is-style-outline"} -->
<div class="wp-block-button is-style-outline"><a class="wp-block-button__link has-text-color no-border-radius" href="#" style="color:#ffffff">Get in touch</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div></div>
<!-- /wp:atomic-blocks/ab-column --></div></div>
<!-- /wp:atomic-blocks/ab-columns -->
Expand Down
Loading

0 comments on commit 1c1e281

Please sign in to comment.