-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added `scripts` folder for a standard interface to perform common tasks
- Loading branch information
Showing
4 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
composer install --dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
function check_for_command { | ||
if ! hash eval "$1" 2>/dev/null; then | ||
echo "✖ Could not find '$1'" | ||
exit 1 | ||
fi | ||
echo "✓ Found $1" | ||
} | ||
|
||
check_for_command "php" | ||
check_for_command "composer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
if ! hash brew 2>/dev/null; then | ||
echo "✖ Homebrew not found. Please install: https://brew.sh/" | ||
exit 1 | ||
else | ||
echo "✓ Found homebrew" | ||
fi | ||
|
||
if ! hash composer 2>/dev/null; then | ||
read -p "✖ 'composer' not found. Would you like to install it? [Y/n] " -n 1 -r | ||
echo | ||
if [[ $REPLY =~ ^[Yy]$ ]] | ||
then | ||
curl -s https://getcomposer.org/installer | php | ||
mv composer.phar /usr/local/bin/composer | ||
else | ||
exit 1 | ||
fi | ||
else | ||
echo "✓ Found composer" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
./vendor/bin/phpunit |