-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (40 loc) · 839 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
43
44
45
46
47
48
49
50
51
52
# Include all variables defined in Makefile.vars
include Makefile.vars
# Defines what services or packages will be targeted
scope:=$(SCOPE)
BUILD_SCOPE:=all
create-env:
@./scripts/create-env
.PHONY:
bootstrap:
npm run bootstrap
.PHONY: build
build:
npm ci
npm run build:$(BUILD_SCOPE) --service=@trainscoding/$(SERVICE_NAME)
.PHONY: build-all
build-all:
npm ci
npm run build:$(BUILD_SCOPE)
# Spin up development environment
.PHONY: up
up: create-env
$(MAIN_DOCKER_COMPOSE) up --abort-on-container-exit
.PHONY: test
test:
ifdef scope
$(SCOPED_TEST_DOCKER_COMPOSE) up --abort-on-container-exit
else
$(TEST_DOCKER_COMPOSE) up --abort-on-container-exit
endif
.PHONY: lint
lint: node_modules
npm run lint
.PHONY: lint-fix
lint-fix: node_modules
npm run lint:fix
node_modules:
npm ci
.PHONY:
publish:
npm run publish:ci