Skip to content

Commit

Permalink
refactor: Update makefile if clause flag
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasdutraf authored Apr 8, 2021
1 parent e9e0627 commit d4f355c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
SHELL := /bin/bash # Use bash syntax
CURRENT_DIR := $(shell pwd)
RUNNING_NETWORK := $(shell docker network ls -f name=lendit | grep lendit )
RUNNING_NETWORK := $(shell sudo docker network ls -f name=lendit | grep lendit )


build:
sudo docker-compose -f docker-compose.dev.yml build

run:
@if [[ -d "${RUNNING_NETWORK}" ]]; then \
@if [[ -n "${RUNNING_NETWORK}" ]]; then \
sudo docker-compose -f docker-compose.dev.yml up; \
else \
sudo docker network create lendit_gateway; \
Expand All @@ -16,15 +16,15 @@ run:


run-silent:
@if [[ -d "${RUNNING_NETWORK}" ]]; then \
@if [[ -n "${RUNNING_NETWORK}" ]]; then \
sudo docker-compose -f docker-compose.dev.yml up -d; \
else \
sudo docker network create lendit_gateway; \
sudo docker-compose -f docker-compose.dev.yml up -d; \
fi

run-build:
@if [[ -d "${RUNNING_NETWORK}" ]]; then \
@if [[ -n "${RUNNING_NETWORK}" ]]; then \
sudo docker-compose -f docker-compose.dev.yml up --build; \
else \
sudo docker network create lendit_gateway; \
Expand All @@ -44,4 +44,4 @@ check-db:
sudo docker-compose -f docker-compose.dev.yml exec db psql -U postgres

cov:
sudo docker-compose -f docker-compose.dev.yml run user npm run cov
sudo docker-compose -f docker-compose.dev.yml run user npm run cov

0 comments on commit d4f355c

Please sign in to comment.