Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Fix cannot re-declare class ComposerAutoloaderInitXXX error
Browse files Browse the repository at this point in the history
  • Loading branch information
tangrufus committed Mar 4, 2017
1 parent 3cd3109 commit 2e99f04
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ before_install:
- wp plugin install ./release/wp-cloudflare-guard.zip --force --activate --path=/tmp/wordpress
# Export a dump of plugin-activated database to the _data folder
- wp db export $TRAVIS_BUILD_DIR/tests/_data/dump.sql --path=/tmp/wordpress
# Clean to prevent cannot re-declare class ComposerAutoloaderInitXXX error.
- grunt post-build

install:
- travis_retry composer install --prefer-dist --no-suggest
Expand Down
7 changes: 7 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ module.exports = function ( grunt ) {
'release/',
'vendor/'
]
},
"post-build": {
src: [
'build/',
'vendor/'
]
}
},

Expand Down Expand Up @@ -188,6 +194,7 @@ module.exports = function ( grunt ) {
grunt.registerTask( 'i18n', ['addtextdomain', 'makepot'] );
grunt.registerTask( 'pre-tag', ['version', 'i18n'] );
grunt.registerTask( 'pre-build', ['clean:pre-build'] );
grunt.registerTask( 'post-build', ['clean:post-build'] );
grunt.registerTask( 'build', ['copy:build', 'compress:build'] );

grunt.util.linefeed = '\n';
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
"scripts": {
"build": [
"npm update",
"npm install",
"grunt pre-build",
"composer install --no-dev --prefer-dist --no-suggest",
"grunt build"
Expand All @@ -79,7 +79,7 @@
"phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs"
],
"pre-autoload-dump": [
"npm update",
"npm install",
"cfwp build",
"grunt replace_namespaces"
],
Expand Down

0 comments on commit 2e99f04

Please sign in to comment.