2019-04-25 11:56:34 +00:00
|
|
|
UTILS_PATH := build_utils
|
2019-12-10 15:14:50 +00:00
|
|
|
SWAGGER_SCHEMES_PATH := schemes/swag/v3 schemes/claim-management/v0 schemes/questionary/v0 schemes/questionary-aggr-proxy/v0 schemes/swag-analytics/v1 schemes/messages/v0
|
2019-08-12 13:34:18 +00:00
|
|
|
SUBMODULES = $(UTILS_PATH) $(SWAGGER_SCHEMES_PATH)
|
2019-04-25 11:56:34 +00:00
|
|
|
|
2018-11-30 13:26:03 +00:00
|
|
|
SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES))
|
|
|
|
|
|
|
|
UTILS_PATH := build_utils
|
|
|
|
TEMPLATES_PATH := .
|
|
|
|
|
|
|
|
# Name of the service
|
|
|
|
SERVICE_NAME := dashboard
|
|
|
|
# Service image default tag
|
|
|
|
SERVICE_IMAGE_TAG ?= $(shell git rev-parse HEAD)
|
|
|
|
# The tag for service image to be pushed with
|
|
|
|
SERVICE_IMAGE_PUSH_TAG ?= $(SERVICE_IMAGE_TAG)
|
|
|
|
|
2019-04-02 11:56:34 +00:00
|
|
|
REGISTRY ?= dr2.rbkmoney.com
|
|
|
|
|
2018-11-30 13:26:03 +00:00
|
|
|
# Base image for the service
|
|
|
|
BASE_IMAGE_NAME := service-fe
|
2019-04-02 11:56:34 +00:00
|
|
|
BASE_IMAGE_TAG := 2b4570bc1d9631c10aaed2132eb87eb9003f3471
|
2018-11-30 13:26:03 +00:00
|
|
|
|
2019-04-02 11:56:34 +00:00
|
|
|
BUILD_IMAGE_TAG := f3732d29a5e622aabf80542b5138b3631a726adb
|
2018-11-30 13:26:03 +00:00
|
|
|
|
|
|
|
GIT_SSH_COMMAND :=
|
|
|
|
DOCKER_RUN_OPTS = -e GIT_SSH_COMMAND='$(GIT_SSH_COMMAND)'
|
|
|
|
|
2019-05-06 10:53:24 +00:00
|
|
|
CALL_W_CONTAINER := init check lint test build clean submodules compile
|
2018-11-30 13:26:03 +00:00
|
|
|
|
|
|
|
.PHONY: $(CALL_W_CONTAINER)
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
-include $(UTILS_PATH)/make_lib/utils_image.mk
|
|
|
|
-include $(UTILS_PATH)/make_lib/utils_container.mk
|
|
|
|
|
|
|
|
$(SUBTARGETS): %/.git: %
|
|
|
|
git submodule update --init $<
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
submodules: $(SUBTARGETS)
|
|
|
|
|
2019-05-06 10:53:24 +00:00
|
|
|
init: npm-init compile
|
|
|
|
|
|
|
|
npm-init:
|
2019-06-26 13:12:03 +00:00
|
|
|
NG_CLI_ANALYTICS=false npm ci
|
2018-11-30 13:26:03 +00:00
|
|
|
|
|
|
|
build: check lint
|
|
|
|
npm run build
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf dist
|
|
|
|
|
|
|
|
check:
|
|
|
|
npm run check
|
|
|
|
|
|
|
|
lint:
|
|
|
|
npm run lint
|
|
|
|
|
|
|
|
test:
|
2019-04-25 11:56:34 +00:00
|
|
|
npm run test
|
|
|
|
|
2019-08-12 13:34:18 +00:00
|
|
|
swagger:
|
|
|
|
npm run codegen
|
2019-05-06 10:53:24 +00:00
|
|
|
|
|
|
|
KONTUR_FOCUS_MODEL_DIR = src/app/kontur-focus/gen-model
|
|
|
|
KONTUR_FOCUS_API = req req/mon monList analytics contacts egrDetails egrDetails/mon licences buh fssp govPurchasesOfParticipant govPurchasesOfCustomer stat
|
|
|
|
kontur-focus-clean:
|
|
|
|
rm -rf $(KONTUR_FOCUS_MODEL_DIR)
|
|
|
|
kontur-focus-compile:
|
|
|
|
$(foreach req,$(KONTUR_FOCUS_API),\
|
|
|
|
mkdir -p $(shell dirname $(KONTUR_FOCUS_MODEL_DIR)/$(req).ts);\
|
|
|
|
npm run quicktype -- https://focus-api.kontur.ru/api3/$(req)/schema -o $(KONTUR_FOCUS_MODEL_DIR)/$(req).ts;\
|
|
|
|
)
|
|
|
|
kontur-focus: kontur-focus-clean kontur-focus-compile
|
|
|
|
|
|
|
|
compile: swagger kontur-focus
|