Skip to content

Commit

Permalink
Fix watch and bin commands and refactor aliases (#3)
Browse files Browse the repository at this point in the history
fix: bin command and refactor aliases
  • Loading branch information
leocavalcante authored Oct 24, 2023
1 parent ba7dc77 commit cd11ebd
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions hfctl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e

HFCTL=v0.1.0
HFCTL=v0.2.0
IMAGE=hyperf/hyperf:8.2-alpine-v3.18-swoole-v5.1
HFCID=/tmp/hfctl.cid

Expand Down Expand Up @@ -61,7 +61,7 @@ start() {
watch() {
pre-check
composer show hyperf/watcher
echo $(bin -dp${1:-9501}:9501 server:watch) > $HFCID
echo $(docker-run -dp${1:-9501}:9501 php bin/hyperf.php server:watch) > $HFCID
logs
}

Expand All @@ -77,15 +77,7 @@ restart() {

bin() {
pre-check
docker-run -it composer php bin/hyperf.php $@
}

cmd() {
bin
}

command() {
bin
docker-run -it php bin/hyperf.php $@
}

logs() {
Expand All @@ -106,4 +98,5 @@ pre-check() {

CMD=${1:-help}
ARGS=${@:2}
if [[ $CMD =~ command|cmd ]]; then CMD=bin; fi
$CMD $ARGS

0 comments on commit cd11ebd

Please sign in to comment.