From feb680f95404e84a6a9916163d842ecf3f4646b3 Mon Sep 17 00:00:00 2001 From: mostafa Date: Fri, 9 Oct 2026 13:02:52 +0400 Subject: [PATCH] Add a composer dist script for the production install The zip build and the test workflow both spelled out the same Composer flags. Rename the unused build script to dist and call it from both. Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/tests.yml | 2 +- bin/build-zip.sh | 2 +- composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f45330e..c5219e4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -162,7 +162,7 @@ jobs: php-version: '8.2' coverage: none - run: composer install --no-interaction --prefer-dist - - run: composer install --no-dev --optimize-autoloader --classmap-authoritative --no-interaction + - run: composer dist - uses: actions/setup-node@v7 with: node-version: 22 diff --git a/bin/build-zip.sh b/bin/build-zip.sh index 910573f..6f09847 100755 --- a/bin/build-zip.sh +++ b/bin/build-zip.sh @@ -22,7 +22,7 @@ VERSION=$(grep -oE 'Version:[[:space:]]+[0-9.]+' "$SLUG.php" | awk '{print $2}') if [ "${1:-}" != "--skip-install" ]; then composer install --no-interaction --prefer-dist --no-progress - composer install --no-dev --optimize-autoloader --classmap-authoritative --no-interaction --no-progress + composer dist --no-progress npm ci --no-audit --no-fund npm run build git diff --exit-code --stat -- build || { echo "build/ is out of date: run npm run build and commit it" >&2; exit 1; } diff --git a/composer.json b/composer.json index 70d79a3..79f3414 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "scripts": { "test": "phpunit", "test:integration": "phpunit -c phpunit-integration.xml.dist", - "build": "composer install --no-dev --optimize-autoloader --classmap-authoritative" + "dist": "composer install --no-dev --optimize-autoloader --classmap-authoritative --no-interaction" }, "require-dev": { "brain/monkey": "^2.6",