Skip to content
Merged
Show file tree
Hide file tree
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: 3 additions & 3 deletions ci/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [[ "false" != "$TRAVIS_PULL_REQUEST" ]]; then
exit
fi

if [ -z $DEPLOY_BRANCH ]; then
if [ -z "$DEPLOY_BRANCH" ]; then
echo "Skipping deployment as DEPLOY_BRANCH is not set"
exit
fi
Expand All @@ -21,7 +21,7 @@ fi
set +x

# Get the encrypted private key from the repo settings
echo $WP_CLI_REPO_DEPLOY_KEY | base64 --decode > ~/.ssh/id_rsa
echo "$WP_CLI_REPO_DEPLOY_KEY" | base64 --decode > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa

# anyone can read the build log, so it MUST NOT contain any sensitive data
Expand All @@ -32,7 +32,7 @@ echo "|1|qPmmP7LVZ7Qbpk7AylmkfR0FApQ=|WUy1WS3F4qcr3R5Sc728778goPw= ssh-rsa AAAAB

git clone git@github.com:wp-cli/builds.git
mv PHAR_BUILD_VERSION builds/phar/NIGHTLY_VERSION
cd builds
cd builds || exit

git config user.name "Travis CI"
git config user.email "travis@travis-ci.org"
Expand Down
25 changes: 13 additions & 12 deletions features/skip-themes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -52,65 +52,66 @@ Feature: Skipping themes
"""
And STDERR should be empty

@require-wp-4.4
Scenario: Skip parent and child themes
Given a WP installation
And I run `wp theme install jolene biker`
And I run `wp theme install primer stout`

When I run `wp theme activate jolene`
When I run `wp eval 'var_export( function_exists( "jolene_setup" ) );'`
When I run `wp theme activate primer`
When I run `wp eval 'var_export( function_exists( "primer_setup" ) );'`
Then STDOUT should be:
"""
true
"""
And STDERR should be empty

When I run `wp --skip-themes=jolene eval 'var_export( function_exists( "jolene_setup" ) );'`
When I run `wp --skip-themes=primer eval 'var_export( function_exists( "primer_setup" ) );'`
Then STDOUT should be:
"""
false
"""
And STDERR should be empty

When I run `wp theme activate biker`
When I run `wp eval 'var_export( function_exists( "jolene_setup" ) );'`
When I run `wp theme activate stout`
When I run `wp eval 'var_export( function_exists( "primer_setup" ) );'`
Then STDOUT should be:
"""
true
"""
And STDERR should be empty

When I run `wp eval 'var_export( function_exists( "biker_setup" ) );'`
When I run `wp eval 'var_export( function_exists( "stout_move_elements" ) );'`
Then STDOUT should be:
"""
true
"""
And STDERR should be empty

When I run `wp --skip-themes=biker eval 'var_export( function_exists( "jolene_setup" ) );'`
When I run `wp --skip-themes=stout eval 'var_export( function_exists( "primer_setup" ) );'`
Then STDOUT should be:
"""
false
"""
And STDERR should be empty

When I run `wp --skip-themes=biker eval 'var_export( function_exists( "biker_setup" ) );'`
When I run `wp --skip-themes=stout eval 'var_export( function_exists( "stout_move_elements" ) );'`
Then STDOUT should be:
"""
false
"""
And STDERR should be empty

When I run `wp --skip-themes=biker eval 'echo get_template_directory();'`
When I run `wp --skip-themes=stout eval 'echo get_template_directory();'`
Then STDOUT should contain:
"""
wp-content/themes/jolene
wp-content/themes/primer
"""
And STDERR should be empty

When I run `wp --skip-themes=biker eval 'echo get_stylesheet_directory();'`
Then STDOUT should contain:
"""
wp-content/themes/biker
wp-content/themes/stout
"""
And STDERR should be empty

Expand Down