Skip to content

Commit

Permalink
mage-report feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz Olszewski committed Feb 3, 2017
1 parent b08135a commit 8207c31
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions mage2docker.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ _mage2docker_mage() {
docker exec -it -u www-data $1 bin/magento $2
}

_mage2docker_report() {
compadd `docker exec -u www-data $1 ls -tr var/report`
}

_mage2docker() {

local curcontext="$curcontext" state line
Expand All @@ -29,13 +33,16 @@ _mage2docker() {
compadd $(_docker_get_container_name)
;;
command)
compadd "$@" bash-www bash logs magento mage mage-cache mage-di mage-upgrade grunt rename rm restart stop inspect top
compadd "$@" bash-www bash logs magento mage mage-cache mage-di mage-upgrade mage-report grunt rename rm restart stop inspect top
;;
options)
case $words[3] in
mage)
_mage2docker_magento $words[2]
;;
mage-report)
_mage2docker_report $words[2]
;;
esac
esac
}
Expand Down Expand Up @@ -75,7 +82,14 @@ mage2docker () {
_mage2docker_mage $1 setup:static-content:deploy
;;
grunt)
docker exec -it -u www-data $1 grunt
docker exec -it -u www-data $1 grunt
;;
mage-report)
docker exec -it -u www-data $1 cat var/report/$3
;;
*)
docker ps
;;
esac

}
Expand Down

0 comments on commit 8207c31

Please sign in to comment.