Skip to content

Commit

Permalink
Only run composer install/update for build-cs in PHP 8+
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Jan 30, 2024
1 parent 36b9d57 commit 3df9c5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"php": ">=7|^8"
},
"scripts": {
"post-install-cmd": "composer --working-dir=build-cs install --no-interaction",
"post-update-cmd": "composer --working-dir=build-cs update --no-interaction",
"post-install-cmd": "if [ $(php -r 'echo PHP_MAJOR_VERSION;') -ge 8 ]; then composer --working-dir=build-cs install --no-interaction; else echo 'Skipping composer install for build-cs since not on PHP 8.'; fi",
"post-update-cmd": "if [ $(php -r 'echo PHP_MAJOR_VERSION;') -ge 8 ]; then composer --working-dir=build-cs update --no-interaction; else echo 'Skipping composer update for build-cs since not on PHP 8.'; fi",
"phpstan": "build-cs/vendor/bin/phpstan analyse --memory-limit=2048M -c phpstan.neon.dist",
"format": "build-cs/vendor/bin/phpcbf --standard=phpcs.xml.dist --report-summary --report-source",
"lint": "build-cs/vendor/bin/phpcs --standard=phpcs.xml.dist",
Expand Down

0 comments on commit 3df9c5d

Please sign in to comment.