diff --git a/Gruntfile.js b/Gruntfile.js index c0baa9fd8b3..24f1475ee3b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -91,7 +91,7 @@ module.exports = function( grunt ) { grunt.config.set( 'copy', { build: { src: res.stdout.trim().split( /\n/ ).filter( function( file ) { - return ! /^(\.|bin|([^/]+)+\.(md|json|xml)|Gruntfile\.js|tests|wp-assets|dev-lib|readme\.md)/.test( file ); + return ! /^(\.|bin|([^/]+)+\.(md|json|xml)|Gruntfile\.js|tests|wp-assets|dev-lib|readme\.md|composer\..*)/.test( file ); } ), dest: 'build', expand: true diff --git a/bin/verify-version-consistency.php b/bin/verify-version-consistency.php index 4a42d2fcb9f..1c9b8328fee 100755 --- a/bin/verify-version-consistency.php +++ b/bin/verify-version-consistency.php @@ -1,4 +1,4 @@ -#!/usr/bin/env +#!/usr/bin/env php \d+\.\d+(?:.\d+)?)/', $plugin_file, $matches ) ) { +if ( ! preg_match( '/\*\s*Version:\s*(?P\d+\.\d+(?:.\d+)?(-\w+)?)/', $plugin_file, $matches ) ) { echo "Could not find version in readme metadata\n"; exit( 1 ); } @@ -59,3 +59,8 @@ fwrite( STDERR, "Error: Not all version references have been updated.\n" ); exit( 1 ); } + +if ( false === strpos( $versions['amp.php#metadata'], '-' ) && ! preg_match( '/^\d+\.\d+\.\d+$/', $versions['amp.php#metadata'] ) ) { + fwrite( STDERR, sprintf( "Error: Release version (%s) lacks patch number. For new point releases, supply patch number of 0, such as 0.9.0 instead of 0.9.\n", $versions['amp.php#metadata'] ) ); + exit( 1 ); +}