forked from mozilla-conduit/lando
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (36 loc) · 983 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
SHELL := /bin/bash
DOCKER := $(shell which docker)
DOCKER_COMPOSE := $(shell which docker-compose)
ifeq ($(STANDALONE), 1)
BASE_COMMAND := docker-compose run lando
else
BASE_COMMAND := docker exec -ti suite-lando-1
endif
.PHONY: help
help:
@"$(DOCKER)" --version
@"$(DOCKER_COMPOSE)" --version
@echo "usage: make <target>"
@echo
@echo "target is one of:"
@echo " help show this message and exit"
@echo " format run ruff and black on source code"
@echo " test run the test suite"
@echo " migrations generates migration files to reflect model changes in the database"
@echo " attach attach for debugging (ctrl-p ctrl-q to detach)"
.PHONY: test
test:
$(BASE_COMMAND) lando tests
.PHONY: format
format:
$(BASE_COMMAND) lando format
.PHONY: migrations
migrations:
$(BASE_COMMAND) lando makemigrations
.PHONY: attach
attach:
ifeq ($(INSUITE), 1)
-@docker attach suite-lando-1 ||:
else
-@docker-compose attach lando ||:
endif