From a406bae2be3bbd14df0babb86199b5f8f0f502ba Mon Sep 17 00:00:00 2001 From: Eric Farkas Date: Mon, 29 Oct 2018 09:48:02 -0400 Subject: [PATCH] Adds 'servers' to bin/ The `servers` command will try to spin up local dev servers by looking for: * Procfile.local * Procfile If neither exist, it will call `bin/rails server`. --- bin/servers | 15 +++++++++++++++ zshrc | 11 +++-------- 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100755 bin/servers diff --git a/bin/servers b/bin/servers new file mode 100755 index 0000000..02caf11 --- /dev/null +++ b/bin/servers @@ -0,0 +1,15 @@ +# !/bin/sh +# Usage: servers +# Boot up local dev servers, looking for: +# * Procfile.local +# * Procfile +# If those don't exist, then: +# * bin/rails server + +if [ -f Procfile.local ]; then + foreman start --procfile=Procfile.local +elif [ -f Procfile ]; then + foreman start +else + bin/rails server +fi diff --git a/zshrc b/zshrc index 5b2e33a..8d595a3 100644 --- a/zshrc +++ b/zshrc @@ -23,10 +23,8 @@ export FZF_DEFAULT_COMMAND='ag --hidden -g ""' setopt auto_cd cdpath=($HOME/dev) -# .localrc: for stuff you don't want -# in your public, versioned repo -if [[ -a ~/.localrc ]] -then +# .localrc: for stuff you don't want in your public, versioned repo +if [[ -a ~/.localrc ]]; then source ~/.localrc fi @@ -43,15 +41,12 @@ alias effincamera="sudo killall VDCAssistant" alias fe="(cd frontend && yarn start)" alias flush_dns="sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache" alias flush_redis="redis-cli flushall" -alias fr="flush_redis" -alias fs="foreman start" alias mini="ruby -Ilib:test" alias release="g cm && g pull && bin/rake release_notes | pbcopy" alias reset_touchbar="pkill 'Touch Bar agent'; killall 'ControlStrip';" -alias rs="bin/rspec --no-profile" # --order defined +alias rs="bin/rspec --no-profile" alias reload="source $HOME/.zshrc" alias rs="recent_specs" -alias servers="fs --procfile=Procfile.local" alias sr="bin/rspec --no-profile --tty" alias srf="sr --only-failures" alias testtail="tail -f ./log/test.log"