mirror of
https://github.com/archtechx/airwire.git
synced 2025-12-12 02:34:04 +00:00
wip
This commit is contained in:
parent
cdc9f32611
commit
04427ab112
22 changed files with 308 additions and 30 deletions
47
check
Executable file
47
check
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
offer_run() {
|
||||
read -p "For more output, run $1. Run it now (Y/n)? " run
|
||||
|
||||
case ${run:0:1} in
|
||||
n|N )
|
||||
exit 1
|
||||
;;
|
||||
* )
|
||||
$1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
if (php-cs-fixer fix --dry-run --config=.php-cs-fixer.php > /dev/null 2>/dev/null); then
|
||||
echo '✅ php-cs-fixer OK'
|
||||
else
|
||||
read -p "⚠️ php-cs-fixer found issues. Fix (Y/n)? " fix
|
||||
case ${fix:0:1} in
|
||||
n|N )
|
||||
echo '❌ php-cs-fixer FAIL'
|
||||
offer_run 'php-cs-fixer fix --config=.php-cs-fixer.php'
|
||||
;;
|
||||
* )
|
||||
if (php-cs-fixer fix --config=.php-cs-fixer.php > /dev/null 2>/dev/null); then
|
||||
echo '✅ php-cs-fixer OK'
|
||||
else
|
||||
echo '❌ php-cs-fixer FAIL'
|
||||
offer_run 'php-cs-fixer fix --config=.php-cs-fixer.php'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if (./vendor/bin/pest > /dev/null 2>/dev/null); then
|
||||
echo '✅ Pest OK'
|
||||
else
|
||||
echo '❌ Pest FAIL'
|
||||
offer_run './vendor/bin/pest'
|
||||
fi
|
||||
|
||||
echo '=================='
|
||||
echo '✅ Everything OK'
|
||||
Loading…
Add table
Add a link
Reference in a new issue