-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgrumphp-run-all.sh
executable file
·38 lines (33 loc) · 1.17 KB
/
grumphp-run-all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
set -exuo pipefail
# Run all grumphp tasks
CWD=$(pwd)
# foreach packages/*
directories=$(find $CWD/packages -maxdepth 1 -mindepth 1 -type d)
for dir in $directories
do
cd $dir
# cleanup each package symlinks:
rm -rf vendor/pluswerk/grumphp-bom-task vendor/pluswerk/grumphp-xliff-task vendor/andersundsehr/phpstan-git-files vendor/andersundsehr/rector-p
done
for dir in $directories
do
cd $dir
echo -e "\033[0;31m"
echo -e "\n\n\n Running grumphp in $(basename $(pwd))\n\n\n"
echo -e "\033[0m"
# mirroring of composer takes to long so we use rsync instead of deleting the vendor folder
rsync -az --exclude=packages --exclude=vendor $CWD/ vendor/pluswerk/grumphp-config/
# update everything else:
composer update
# run the checks:
vendor/bin/grumphp run
# cleanup symlinks so that we can run the script again
rm -rf vendor/pluswerk/grumphp-bom-task vendor/pluswerk/grumphp-xliff-task vendor/andersundsehr/phpstan-git-files vendor/andersundsehr/rector-p
done
cd $CWD
echo -e "\033[0;31m"
echo -e "\n\n\n Running grumphp in ROOT\n\n\n"
echo -e "\033[0m"
composer update
vendor/bin/grumphp run