ci: add check to ensure composer-bin is not accidentally committed

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2025-04-09 18:24:49 +02:00
parent e5b34b700d
commit fa8b389b6e
No known key found for this signature in database
GPG key ID: 4A81C29F63464E8F
2 changed files with 8 additions and 3 deletions

View file

@ -36,6 +36,7 @@ jobs:
- 'composer.json'
- 'composer.lock'
- '**.php'
- build/autoloaderchecker.sh
autoloader:
runs-on: ubuntu-latest
@ -66,9 +67,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up dependencies
run: composer i
- name: Check auto loaders
run: bash ./build/autoloaderchecker.sh

View file

@ -34,6 +34,13 @@ echo
echo "Regenerating main autoloader"
$COMPOSER_COMMAND dump-autoload -d $REPODIR
FOUND_COMPOSER_BIN=$(grep --recursive --fixed-strings 'Bamarni\\Composer\\Bin' $REPODIR/lib/composer/composer/)
if [ -n "$FOUND_COMPOSER_BIN" ]; then
echo "The main autoloader contains the composer bin plugin"
echo "Run composer again with --no-dev and commit the result"
exit 1
fi
for app in ${REPODIR}/apps/*; do
if git check-ignore ${app} -q ; then
echo