diff --git a/.distignore b/.distignore index 620388a..fa26681 100644 --- a/.distignore +++ b/.distignore @@ -1,6 +1,7 @@ /.wordpress-org /.git /.github +/bin /reports /tests .distignore diff --git a/.github/workflows/plugin-check.yml b/.github/workflows/plugin-check.yml new file mode 100644 index 0000000..7bbe7cc --- /dev/null +++ b/.github/workflows/plugin-check.yml @@ -0,0 +1,22 @@ +name: Plugin Check +on: # rebuild any PRs and main branch changes + pull_request: + push: + branches: + - master + - 'releases/*' + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Composer dependencies + run: composer install --no-dev --no-interaction --optimize-autoloader + - name: Build + run: composer run-script build + - name: Run plugin check + uses: wordpress/plugin-check-action@v1 + with: + build-dir: './mslsselect' \ No newline at end of file diff --git a/.gitignore b/.gitignore index a6c6901..5f61134 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ phpunit.xml.bak .idea/ vendor/ coverage/ +mslsselect/ +mslsselect.zip diff --git a/MslsSelect.php b/MslsSelect.php index 8b4abda..cabb6b4 100644 --- a/MslsSelect.php +++ b/MslsSelect.php @@ -1,31 +1,33 @@ true, + 'strategy' => 'defer', + ) + ); } /** diff --git a/bin/git-release.sh b/bin/git-release.sh new file mode 100755 index 0000000..6628db1 --- /dev/null +++ b/bin/git-release.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +PROJECT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" +PLUGIN_NAME="mslsselect" +BUILD_PATH="$PROJECT_ROOT/$PLUGIN_NAME" +ZIP_ARCHIVE="$PROJECT_ROOT/$PLUGIN_NAME.zip" + +rm -f $ZIP_ARCHIVE +rm -rf $BUILD_PATH && mkdir $BUILD_PATH + +rsync -arvp --exclude-from=$PROJECT_ROOT/.distignore $PROJECT_ROOT/ $BUILD_PATH/ +cd $PROJECT_ROOT && zip -r $ZIP_ARCHIVE $PLUGIN_NAME diff --git a/composer.json b/composer.json index ac109c2..5c6b539 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,11 @@ "scripts": { "test": "vendor/bin/phpunit", "coverage": "php -d xdebug.mode=coverage vendor/bin/phpunit --coverage-html coverage", - "analyze": "vendor/bin/phpstan analyze" + "analyze": "vendor/bin/phpstan analyze", + "git-release": "bin/git-release.sh", + "build": [ + "@git-release" + ] }, "config": { "allow-plugins": { diff --git a/readme.txt b/readme.txt index 38f2ff9..03ec49b 100644 --- a/readme.txt +++ b/readme.txt @@ -2,11 +2,11 @@ Contributors: realloc Donate link: http://www.greenpeace.org/international/ -Tags: multilingual, multisite, language, switcher, international, localization, i18n, menu, select-box, html select +Tags: multilingual, multisite, language, switcher, select Requires at least: 5.6 -Tested up to: 6.5 +Tested up to: 6.6 Requires PHP: 7.4 -Stable tag: 2.3.1 +Stable tag: 2.3.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -26,6 +26,10 @@ But if you look for an **easy way** to change the output of the _Multisite Langu == Changelog == += 2.3.2 = +* Plugin check action added +* Resulting errors addressed + = 2.3.1 = * WordPress 6.5 tested * "Requires Plugins" added