-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'cache-clean' of git://github.com/rangerz/docker-magento…
… into rangerz-cache-clean
- Loading branch information
Showing
7 changed files
with
38 additions
and
16 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
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 |
---|---|---|
@@ -1,2 +1,24 @@ | ||
#!/bin/bash | ||
bin/cli /var/www/.composer-global/vendor/bin/cache-clean.js "$@" | ||
COMPOSER_GLOBAL=/var/www/.composer-global | ||
CACHE_CLEAN=${COMPOSER_GLOBAL}/vendor/bin/cache-clean.js | ||
|
||
if ! bin/cliq ls $CACHE_CLEAN; then | ||
echo "Installing devtools metapackage, just a moment..." | ||
bin/cliq mkdir -p ${COMPOSER_GLOBAL} | ||
bin/composer init --working-dir=${COMPOSER_GLOBAL} --quiet --no-interaction | ||
bin/composer require --working-dir=${COMPOSER_GLOBAL} --quiet markshust/magento2-metapackage-devtools-cli:^1.0 | ||
echo "Devtools installed." | ||
fi | ||
|
||
if [ "$1" == "--watch" ]; then | ||
# Kill duplicate watch process | ||
WATCH_PID=$(bin/clinotty ps -eaf | grep "$CACHE_CLEAN --quiet --watch" | grep -v grep | awk '{print $2}') | ||
if [[ "" != "$WATCH_PID" ]]; then | ||
bin/cliq kill -9 "$WATCH_PID" | ||
fi | ||
|
||
# Run watch mode in the background | ||
bin/cliq $CACHE_CLEAN --quiet --watch & | ||
else | ||
bin/cli $CACHE_CLEAN "$@" | ||
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/bin/bash | ||
[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit | ||
# -T: Disable pseudo-tty allocation | ||
docker-compose exec -T phpfpm "$@" |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/bin/bash | ||
[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit | ||
bin/clinotty "$@" >/dev/null | ||
# Without stdout and stderr | ||
bin/clinotty "$@" >/dev/null 2>&1 |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,14 @@ | ||
#!/bin/bash | ||
if ! bin/clinotty ls bin/n98-magerun2.phar 1> /dev/null 2>&1; then | ||
bin/clinotty mkdir -p bin | ||
bin/clinotty curl https://files.magerun.net/n98-magerun2.phar -o bin/n98-magerun2.phar | ||
bin/clinotty chmod +x bin/n98-magerun2.phar | ||
if ! bin/cliq ls bin/n98-magerun2.phar; then | ||
echo "Downloading n98-magerun2.phar, just a moment..." | ||
bin/clinotty curl -sS -O https://files.magerun.net/n98-magerun2.phar | ||
bin/clinotty curl -sS -o n98-magerun2.phar.sha256 https://files.magerun.net/sha256.php?file=n98-magerun2.phar | ||
bin/clinotty shasum -a 256 -c n98-magerun2.phar.sha256 | ||
[ $? != 0 ] && echo "sha256 checksum do not match!" && exit | ||
|
||
bin/cliq chmod +x n98-magerun2.phar | ||
bin/cliq mkdir -p bin | ||
bin/cliq mv n98-magerun2.phar bin | ||
fi | ||
|
||
bin/cli bin/n98-magerun2.phar "$@" |
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