Skip to content

Commit

Permalink
Cleaned up environment file check
Browse files Browse the repository at this point in the history
  • Loading branch information
mm53bar committed Apr 16, 2013
1 parent a98373d commit 158e4c3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion bin/plow
Expand Up @@ -31,9 +31,11 @@ while test $# != 0; do
case "$1" in
--staging|staging)
ENVIRONMENT=staging
ENV_FILE=.env.$ENVIRONMENT
;;
--production|production)
--production|production)
ENVIRONMENT=production
ENV_FILE=.env.$ENVIRONMENT
;;
--role)
shift
Expand Down Expand Up @@ -70,9 +72,18 @@ bail() {
exit 1
}

<<<<<<< HEAD
if [ ! $ENVIRONMENT ]; then
echo "Assuming staging environment..."
ENVIRONMENT="staging"
=======
if [ ! $ENV_FILE ]; then
ENV_FILE=.env
else
[[ -f $ENV_FILE ]] || bail "$ENV_FILE not found"
source $ENV_FILE
mkdir -p .plow && cat $ENV_FILE > .plow/plow.sh
>>>>>>> Cleaned up environment file check
fi

ENV_FILE=.env.$ENVIRONMENT
Expand Down

0 comments on commit 158e4c3

Please sign in to comment.