diff --git a/bin/build.php b/bin/build.php index 4dd37d3..4f0cbe2 100644 --- a/bin/build.php +++ b/bin/build.php @@ -51,8 +51,8 @@ function zq_git( array $arguments, string $root ): string { exit( 1 ); } -$excluded_roots = array( '.github', 'bin', 'dist', 'docs', 'output', 'scripts', 'tests', 'wordpress-org-assets' ); -$excluded_files = array( '.gitignore', 'composer.json', 'composer.lock', 'phpcs.xml.dist', 'phpunit.xml.dist', 'README.md' ); +$excluded_roots = array( '.github', 'bin', 'dist', 'docs', 'output', 'scripts', 'tests', 'translations', 'wordpress-org-assets' ); +$excluded_files = array( '.gitattributes', '.gitignore', 'composer.json', 'composer.lock', 'phpcs.xml.dist', 'phpunit.xml.dist', 'README.md' ); $tracked = array_values( array_filter( explode( "\0", zq_git( array( 'ls-files', '-z', '--' ), $root ) ) ) ); sort( $tracked, SORT_STRING ); diff --git a/languages/zipquantum-smart-links.pot b/languages/zipquantum-smart-links.pot index 10aaff3..635dd85 100644 --- a/languages/zipquantum-smart-links.pot +++ b/languages/zipquantum-smart-links.pot @@ -2,7 +2,7 @@ # This file is distributed under the GPL-2.0-or-later. msgid "" msgstr "" -"Project-Id-Version: ZipQuantum – Smart Links & QR Codes 1.0.1\n" +"Project-Id-Version: ZipQuantum – Smart Links & QR Codes 1.0.2\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/zipquantum-smart-links\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/readme.txt b/readme.txt index 2683d42..14689a5 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: smart links, deep links, qr code, woocommerce, marketing Requires at least: 6.9 Tested up to: 7.1 Requires PHP: 7.4 -Stable tag: 1.0.1 +Stable tag: 1.0.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -108,6 +108,10 @@ The plugin sends only the site and content information needed for the selected Z == Changelog == += 1.0.2 = + +* Keep development-only translation review files out of the installable package. + = 1.0.1 = * Make synchronization queue status labels fully translatable. diff --git a/tests/SmokeTest.php b/tests/SmokeTest.php index 7680ea7..75cc46e 100644 --- a/tests/SmokeTest.php +++ b/tests/SmokeTest.php @@ -23,10 +23,21 @@ public function test_release_versions_are_aligned(): void { $readme = file_get_contents( $root . '/readme.txt' ); $pot = file_get_contents( $root . '/languages/zipquantum-smart-links.pot' ); - $this->assertMatchesRegularExpression( '/^ \* Version: 1\.0\.1$/m', $plugin ); - $this->assertStringContainsString( "ZIPQUANTUM_SMART_LINKS_VERSION', '1.0.1'", $plugin ); - $this->assertMatchesRegularExpression( '/^Stable tag: 1\.0\.1$/m', $readme ); - $this->assertStringContainsString( 'ZipQuantum – Smart Links & QR Codes 1.0.1', $pot ); + $this->assertSame( 1, preg_match( '/^ \* Version: (\S+)$/m', $plugin, $plugin_version ) ); + $this->assertSame( 1, preg_match( "/ZIPQUANTUM_SMART_LINKS_VERSION', '([^']+)'/", $plugin, $constant_version ) ); + $this->assertSame( 1, preg_match( '/^Stable tag: (\S+)$/m', $readme, $stable_version ) ); + $this->assertSame( 1, preg_match( '/Project-Id-Version: ZipQuantum – Smart Links & QR Codes (\S+)\\\\n/', $pot, $pot_version ) ); + + $this->assertSame( $plugin_version[1], $constant_version[1] ); + $this->assertSame( $plugin_version[1], $stable_version[1] ); + $this->assertSame( $plugin_version[1], $pot_version[1] ); + } + + public function test_package_builder_excludes_development_only_files(): void { + $builder = file_get_contents( dirname( __DIR__ ) . '/bin/build.php' ); + + $this->assertStringContainsString( "'translations'", $builder ); + $this->assertStringContainsString( "'.gitattributes'", $builder ); } public function test_readme_discloses_external_service_and_no_tracking(): void { diff --git a/zipquantum-smart-links.php b/zipquantum-smart-links.php index d0ccc3e..1e4b681 100644 --- a/zipquantum-smart-links.php +++ b/zipquantum-smart-links.php @@ -3,7 +3,7 @@ * Plugin Name: ZipQuantum – Smart Links & QR Codes * Plugin URI: https://zq.tn/ * Description: Turn WordPress and WooCommerce content into ZipQuantum Smart Links and QR codes. - * Version: 1.0.1 + * Version: 1.0.2 * Requires at least: 6.9 * Requires PHP: 7.4 * Author: Xaere @@ -18,7 +18,7 @@ defined( 'ABSPATH' ) || exit; -define( 'ZIPQUANTUM_SMART_LINKS_VERSION', '1.0.1' ); +define( 'ZIPQUANTUM_SMART_LINKS_VERSION', '1.0.2' ); define( 'ZIPQUANTUM_SMART_LINKS_FILE', __FILE__ ); define( 'ZIPQUANTUM_SMART_LINKS_DIR', plugin_dir_path( __FILE__ ) ); define( 'ZIPQUANTUM_SMART_LINKS_URL', plugin_dir_url( __FILE__ ) );