-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 975 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
SHELL := /bin/bash
MAKES := makes
include $(MAKES)/git.mk
include $(MAKES)/realm.mk
include $(MAKES)/realm_config.mk
DOCKER_IMAGES := builder-function
.DEFAULT_GOAL := build-builder-function
include $(MAKES)/docker.mk
include $(MAKES)/installer.mk
include $(MAKES)/npm.mk
DOCKER_RUN_BASE := $(DOCKER) run --rm --init $(DOCKERARGS)
ifeq ($(INTERACTIVE), -it)
DOCKER_RUN := $(DOCKER_RUN_BASE) $(INTERACTIVE) -e LOG_PRETTY=true
else
DOCKER_RUN := $(DOCKER_RUN_BASE)
endif
IMAGE := $(ECR)/builder-function:$(tag)
NPM_COMMANDS = test lint
.PHONY: $(NPM_COMMANDS)
$(NPM_COMMANDS): require-tag
$(DOCKER_RUN) $(IMAGE) bash -c "npm run $@"
reshuffle ?= npx reshuffle
export reshuffle
export apiUrl
export webappUrl
export appName=builder-function
.PHONY: reshuffle-play
reshuffle-play: require-realm-envar
$(MAKES)/reshuffle-wrap.sh ./reshuffle-deploy.sh
.PHONY: reshuffle-destroy
reshuffle-destroy: require-realm-envar
$(MAKES)/reshuffle-wrap.sh ./reshuffle-destroy.sh