Skip to content

Omit file_exists() checks (for vendor and built files) from plugin builds#3173

Merged
westonruter merged 1 commit intodevelopfrom
update/build-process-excluding-dev-code
Sep 4, 2019
Merged

Omit file_exists() checks (for vendor and built files) from plugin builds#3173
westonruter merged 1 commit intodevelopfrom
update/build-process-excluding-dev-code

Conversation

@westonruter
Copy link
Copy Markdown
Member

@westonruter westonruter commented Sep 3, 2019

Fixes #2670

Diff of running build before/after change:

8c8
<  * Version: 1.2.3-alpha-20190903T165926Z-7ba548d8
---
>  * Version: 1.2.3-alpha-20190903T170002Z-05645f60
18c18
< define( 'AMP__VERSION', '1.2.3-alpha-20190903T165926Z-7ba548d8' );
---
> define( 'AMP__VERSION', '1.2.3-alpha-20190903T170002Z-05645f60' );
152,162d151
< if ( ! file_exists( AMP__DIR__ . '/vendor/autoload.php' ) || ! file_exists( AMP__DIR__ . '/vendor/sabberworm/php-css-parser' ) || ! file_exists( AMP__DIR__ . '/assets/js/amp-block-editor.js' ) ) {
< 	$_amp_load_errors->add(
< 		'build_required',
< 		sprintf(
< 			/* translators: %s: composer install && npm install && npm run build */
< 			__( 'You appear to be running the AMP plugin from source. Please do %s to finish installation.', 'amp' ), // phpcs:ignore WordPress.Security.EscapeOutput
< 			'<code>composer install &amp;&amp; npm install &amp;&amp; npm run build</code>'
< 		)
< 	);
< }
< 

@googlebot googlebot added the cla: yes Signed the Google CLA label Sep 3, 2019
@westonruter westonruter added this to the v1.3 milestone Sep 3, 2019
@westonruter westonruter merged commit ef8178e into develop Sep 4, 2019
@westonruter westonruter deleted the update/build-process-excluding-dev-code branch September 4, 2019 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Signed the Google CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unnecessary file_exists() checks from plugin builds

3 participants