Last active
August 8, 2019 11:42
-
-
Save magnusnordlander/d515505ee832f50210fb5ee36a83bd40 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
function dce { | |
if [[ -f .maincontainer ]]; then | |
docker-compose exec $(cat .maincontainer) $* | |
else | |
echo "Could not find .maincontainer file" | |
fi | |
} | |
function dcr { | |
if [[ -f .maincontainer ]]; then | |
docker-compose run $(cat .maincontainer) $* | |
else | |
echo "Could not find .maincontainer file" | |
fi | |
} | |
function dcomposer | |
if [[ -f .maincontainer ]]; then | |
export COMPOSE_API_VERSION="auto" | |
export __COMPOSER_AUTH=$(cat ~/.composer/auth.json) | |
docker-compose exec -e COMPOSER_AUTH="$__COMPOSER_AUTH" -e COMPOSER_MEMORY_LIMIT=4G $(cat .maincontainer) composer $* | |
else | |
echo "Could not find .maincontainer file" | |
fi | |
fi | |
function dphpunit { | |
dce php ./$(composer config bin-dir)/phpunit $* | |
} | |
function dsf { | |
if [[ -f bin/console ]]; then | |
dce php bin/console $* | |
elif [[ -f app/console ]]; then | |
dce php app/console $* | |
elif [[ -f $(composer config bin-dir)/console ]]; then | |
dce php ./$(composer config bin-dir)/console $* | |
else | |
echo "Could not find Symfony console" | |
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
# Go to https://github.com/fervo-and-friends/symf-fish |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment