-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
33 lines (28 loc) · 940 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
APP_NAME := $(or ${APP_NAME},${APP_NAME},turing)
.PHONY: build-ui
build-ui:
@echo "Creating an optimized production build of Turing UI..."
@cd ui && \
yarn install --network-concurrency 1 && \
NODE_OPTIONS=--max_old_space_size=4096 yarn build
.PHONY: build-swagger-ui
build-swagger-ui:
$(MAKE) -C api/api swagger-ui-dist
.PHONY: build-image
build-image: version
@$(eval IMAGE_TAG = $(if $(DOCKER_REGISTRY),$(DOCKER_REGISTRY)/,)${APP_NAME}:${VERSION})
@echo "Building docker image: ${IMAGE_TAG}"
docker build . \
--tag ${IMAGE_TAG} \
--build-arg TURING_API_IMAGE \
--build-arg TURING_UI_DIST_PATH
.PHONY: version
version:
$(eval VERSION=$(if $(OVERWRITE_VERSION),$(OVERWRITE_VERSION),v$(shell scripts/vertagen/vertagen.sh)))
@echo "turing version:" $$VERSION
.PHONY: setup
setup:
@echo "Setting up dev tools..."
@test -x "$(which pre-commit)" || pip install pre-commit
@pre-commit install
@pre-commit install-hooks