Skip to content

Commit 279de8f

Browse files
committed
Makefile support for Windows
1 parent bf40835 commit 279de8f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ FLASK := flask
66
ARGS = $(filter-out $@,$(MAKECMDGOALS))
77

88
.PHONY: all
9+
10+
ifeq ($(OS),Windows_NT)
11+
all: run_windows
12+
else
913
all: run
14+
endif
1015

1116
.PHONY: nuke
1217
nuke:
@@ -48,6 +53,11 @@ run: build
4853
if [ "$$(${DOCKER} ps -q -f name=resources-api)" ]; then ${DOCKER_COMPOSE} down; fi
4954
${DOCKER_COMPOSE} run -p 5000:5000 ${RESOURCES_CONTAINER} ${FLASK} run -h 0.0.0.0
5055

56+
run_windows: build
57+
@cmd /c (IF NOT "$(shell ${DOCKER} ps -q -f name=resources-api)" == "" ${DOCKER_COMPOSE} down)
58+
${DOCKER_COMPOSE} run -p 5000:5000 ${RESOURCES_CONTAINER} ${FLASK} run -h 0.0.0.0
59+
60+
5161
.PHONY: bg
5262
bg:
5363
${DOCKER_COMPOSE} up --build -d

0 commit comments

Comments
 (0)